Part Number Hot Search : 
470M0 2SA854S SFH350V RG2006 AS7C3 NCP5359A PT78N AQV258AX
Product Description
Full Text Search
 

To Download 7549 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev.2.00 mar 05, 2007 page 1 of 70 rej03b0202-0200 preliminary notice: this is not a final specification. some parametric limits are subject to change. description the 7549 group is the 8-bit microcomputer based on the 740 family core technology. the 7549 group has an 8-bit timer, 16- bit timer, serial interface, a/d converter, power-on reset circuit and the low voltage detection circuit. also, the function set rom is equipped. features ? basic machine-language instructions ................. ........... ......71 ? the minimum instruction execution time ................... 0.25 s (at 8 mhz oscillation fre quency, double-speed mode) ? memory size rom ................................... 2 k, 4k, 6 k bytes ram ........... ........... ........... .......... 192/256 bytes ? programmable i/o ports i/o port............................................................19 output port........................................................1 ? key-on wakeup .......................................................................8 ? led direct drive port..............................................................8 ? interrupts ............................................. 13 sources, 13 vectors ? timers ....................................................................... 8-bit 2 ..................................................................................16-bit 1 ? output compare ........................................................ 3 channel ? input capture ....... ........... ........... ........... ........... .......... 1 channel ? serial interface............................................................ 8-bit 1 (uart or clock synchronous) ? a/d converter .... ........... ............. 10-bit re solution 8-channel ? clock generating circuit ..................................... built-in type (connect to external ceramic resona tor or quartz-crystal oscillator, 32 khz quartz-crystal oscillation available) ? high-speed on-chip oscillator ............................ typ. : 4 mhz ? low-speed on-chip oscillator .......................... typ. : 250 khz ? watchdog timer ...................................................... 16-bit 1 ? power-on reset circuit.......................................... built-in type ? low voltage detection circuit .............................. built-in type ? power source voltage x in oscillation frequency (at ceramic resonator, in double-speed mode) at 8 mhz ........................................ 4.5 to 5.5 v at 2 mhz ........................................ 2.4 to 5.5 v at 1 mhz ........................................ 2.2 to 5.5 v x in oscillation frequency (at ceramic res onator, in high -speed mode ) at 8 mhz ........................................ 4.0 to 5.5 v at 4 mhz ........................................ 2.4 to 5.5 v at 1 mhz ........................................ 1.8 to 5.5 v high-speed on-chip oscillator osc illation frequency at 4 mhz......................................... 4.0 to 5.5 v low-speed on-chip oscillat or oscillation frequency at 250 khz (typ. value at v cc = 5v) .... 1.8 to 5.5 v ? power dissipation ........................................................ 30 mw ? operating temperature range ............................... -20 to 85 c application office automation equipment, factory automation equipment, home electric appliances, consumer electronics, etc. 7549 group single-chip 8-bit cmos microcomputer rej03b0202-0200 rev.2.00 mar 05, 2007
rev.2.00 mar 05, 2007 page 2 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 1. pin configuration (prsp0024ga-a type) package type: prsp00 24ga-a (24p2q-a) 12 11 10 9 8 13 7 14 6 15 5 16 4 17 3 18 2 19 1 20 21 22 23 24 m37549g3/g2/g1fp p3 0 p3 1 p1 3 /an 3 /key 3 /t2 out p1 2 /an 2 /key 2 /cmp 2 p1 1 /an 1 /key 1 /cmp 1 p1 0 /an 0 /key 0 /cmp 0 p0 7 (led 7 )/s rdy p0 6 (led 6 )/s clk reset p1 7 /an 7 /key 7 p1 5 /an 5 /key 5 p1 4 /an 4 /key 4 p2 0 /x out /x cout v ss v cc p1 6 /an 6 /key 6 p2 1 /x in /x cin cnv ss p0 0 (led 0 )/int 0 p0 1 (led 1 )/int 1 p0 5 (led 5 )/txd p0 4 (led 4 )/rxd p0 3 (led 3 )/cap 0 p0 2 (led 2 ) pin configuration (top view)
rev.2.00 mar 05, 2007 page 3 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 2. pin configuration (42s1m type) cnv ss v cc nc nc nc m37549rlss p3 0 p3 1 p1 3 /an 3 /key 3 /t2 out p1 2 /an 2 /key 2 /cmp 2 p1 1 /an 1 /key 1 /cmp 1 p1 0 /an 0 /key 0 /cmp 0 p0 7 (led 7 )/s rdy p0 6 (led 6 )/s clk reset p1 7 /an 7 /key 7 p1 5 /an 5 /key 5 p1 4 /an 4 /key 4 p2 0 /x out /x cout v ss p1 6 /an 6 /key 6 p2 1 /x in /x cin p0 0 (led 0 )/int 0 p0 1 (led 1 )/int 1 p0 5 (led 5 )/txd p0 4 (led 4 )/rxd p0 3 (led 3 )/cap 0 p0 2 (led 2 ) nc nc v ss nc nc nc nc nc nc nc nc nc nc nc nc 17 18 19 20 21 26 25 24 23 22 1 2 3 4 5 6 7 8 41 40 42 39 38 37 36 35 9 10 11 12 13 14 15 16 33 32 34 31 30 29 28 27 pin configuration (top view) package type: 42s1m
rev.2.00 mar 05, 2007 page 4 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. performance overview table 1 performance overview parameter function number of basic instructions 71 instruction execution time 0.25 s (minimum instruction, oscill ation frequency 8mhz, double-speed mode) oscillation frequency 8 mhz (maximum) memory sizes rom m37549g1 2k bytes 8 bits m37549g2 4k bytes 8 bits m37549g3 6k bytes 8 bits ram m37549g1 192 bytes 8 bits m37549g2 256 bytes 8 bits m37549g3 256 bytes 8 bits i/o port p0 0 -p0 7 i/o 1-bit 8, led direct drive ports p1 0 -p1 7 i/o 1-bit 8 p2 0 output 1-bit 1 p2 1 i/o 1-bit 1 p3 0 , p3 1 i/o 1-bit 2 interrupt source 13 sources, 13 vectors timer 8-bit 2, 16-bit 1 output compare 3-channel input capture 1 channel serial interface 8-bit 1 (uart or clock synchronous) a/d converter 10-bit resolution 8 channel watchdog timer 16-bit 1 power-on reset circuit built-in low voltage detection circuit built-in clock generating circuit built-in (exter nal ceramic resonator or quartz-cry stal oscillator, external 32-khz quartz-crystal oscillator available) (bui lt-in high/low-speed on-chip oscillator) function set rom area function set rom function set ro m is assigned to address ffd8 16 to ffda 16 . valid/invaid of low voltage detection circuit can be selected. oscillation mode can be selected. enable/disable of watchdog timer and stp instruction can be selected. rom code protect rom code prot ect is assigned to address ffdb 16 . read/write the built-in qzrom by serial programmer is disabled by setting ?00? to rom code protect. power source voltage (at ceramic resonator) double- speed mode at 8 mhz oscillation 4.5 to 5.5 v at 2 mhz oscillation 2.4 to 5.5 v at 1 mhz oscillation 2.2 to 5.5 v high- speed mode at 8 mhz oscillation 4.0 to 5.5 v at 4 mhz oscillation 2.4 to 5.5 v at 1 mhz oscillation 1.8 to 5.5 v power source voltage (at high-speed on- chip oscillator) double- speed mode at 4 mhz oscillation 4.0 to 5.5 v power source voltage (at low-speed on- chip oscillator) double- speed mode at 250 khz oscillation 1.8 to 5.5 v power dissipation tbd operating temperature range -20 to 85 c device structure cmos sillicon gate package 24-pin plastic molded ssop (prsp0024ga-a) 42-pin shrink cerami c piggy back (42s1m)
rev.2.00 mar 05, 2007 page 5 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 3. functional block diagram reset 3 10 cnv ss p1(8) 22422 12321 p0(8) 18 17 16 15 14 13 12 11 r a m r o m a x y s pc l pc h ps c p u v ss 7 v cc 9 0 p2(2) 86 int 0 int 1 sio (8) 5 4 0 p3(2) 20 19 timer 1(8) reset input reset timer a(16) reset reset capture (16) compare (16) a/d converter (10) clock generating circuit i/o port p2 key-on wakeup i/o port p0 clock input clock output functional block diagram watchdog timer timer 2 (8) prescaler 12 (8) low voltage detection circuit power-on reset circuit i/o port p1 i/o port p3 x in /x cin x out /x cout
rev.2.00 mar 05, 2007 page 6 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. pin description note: 1. the oscillation circuit is built in the p2 0 /x out /x cout pin and the p2 1 /x in /x cin pin. when the vcc of the microcomputer is lower than the operation lower bound voltage even if these pins are used as i/o ports, the oscillation circui t is connected and undefined values may be output from these pins. table 2 pin description pin name function function expect a port function v cc ,v ss power source apply voltage of 1.8 to 5.5 v to vcc, and 0 v to vss. cnv ss cnv ss controls the operation mode of the chip. connected to v ss . reset reset input reset input pin for active ?l? p0 0 (led0)/int 0 p0 1 (led1)/int 1 i/o port p0 ?8-bit i/o port. ?i/o direction register al lows each pin to be individu- ally programmed as either input or output. ?cmos compatible input level ?cmos 3-state output structure ?whether a built-in pull-up resistor is to be used or not can be determined by program. ?high drive capacity for led drive port can be selected by program. interrupt input pin p0 2 (led2) p0 3 (led3)/cap 0 capture input pin p0 4 (led4)/r x d p0 5 (led5)/t x d p0 6 (led6)/s clk p0 7 (led7)/s rdy serial interface function pin p1 0 /an 0 /key 0 /cmp 0 p1 1 /an 1 /key 1 /cmp 1 p1 2 /an 2 /key 2 /cmp 2 i/o port p1 ?8-bit i/o port. ?i/o direction register al lows each pin to be individu- ally programmed as either input or output. ?cmos compatible input level ?cmos 3-state output structure ?whether a built-in pull-up resistor is to be used or not can be determined by program. input pins for a/d converter key-input (key-on wake up interrupt input) pin compare output pin p1 3 /an 3 /key 3 /t2 out timer 2 output pin p1 4 /an 4 /key 4 p1 5 /an 5 /key 5 p1 6 /an 6 /key 6 p1 7 /an 7 /key 7 p2 0 /x out /x cout p2 1 /x in /x cin (note) i/o port p2 ?2-bit i/o port. (p2 0 /x out /x cout is only for output) ?i/o direction register al lows each pin to be individu- ally programmed as either input or output. ?cmos compatible input level ?cmos 3-state output structure ?function set rom allows pi ns to be used as clock pins. pins x in and x out , or pins x cin and x cout , can be used as clock pins by connecting a ceramic resonator, crystal oscillator, or 32 khz crystal oscillator between them. alternately, an external clock may be input to the p2 0 /x out /x cout pin. in this case, the p2 1 /x in /x cin pin can be used as an i/o port. p3 0 , p3 1 i/o port p3 ?2-bit i/o port. ?i/o direction register allows each pin to be individually pr ogrammed as either input or output. ?cmos compatible input level ?cmos 3-state output structure
rev.2.00 mar 05, 2007 page 7 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. group expansion renesas plans to expand the 7549 group as follow: memory type support for qzrom version and emulator mcu. memory size ? rom size ...................................................... 2 k to 6 k bytes ? ram size .............. ........... ........... ............ ..... 192 to 256 bytes packages ? prsp0024ga-a .... 0.8 mm-pitch 24-pin plastic molded ssop ? 42s1m ......................... 42-pin shrink ceramic piggy back fig 4. memory expansion plan currently supported produc ts are listed below. note: 1. rom size includes the function set rom. 192 256 6k 4k 2k 0 m37549g1 ** m37549g3 ** ram size (bytes) rom size (bytes) **: under development note: products under development the development schedule and specification may be revised without notice. m37549g2 ** table 3 list of supported products part number rom size (bytes) rom size for user () ram size (bytes) package remarks m37549g3-xxxfp 6144 (6014) 256 prsp0024ga-a qzrom version m37549g3fp qzrom version (blank) m37549g2-xxxfp 4096 (3966) 256 prsp0024ga-a qzrom version m37549g2fp qzrom version (blank) m37549g1-xxxfp 2048 (1918) 192 prsp0024ga-a qzrom version m37549g1fp qzrom version (blank) m37549rlss ? 256 42s1m emulator mcu
rev.2.00 mar 05, 2007 page 8 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. functional description central processing unit (cpu) the mcu uses the standard 740 fa mily instruction set. refer to the table of 740 family addres sing modes and machine-language instructions or the series 740 user?s manual for details on each instruction set. machine-resident 740 family in structions are as follows: 1. the fst and slw instru ctions cannot be used. 2. the mul and div instructions can be used. 3. the wit instruction can be used. 4. the stp instruction can be used. [accumulator (a)] the accumulator is an 8-bit regist er. data operations such as data transfer, etc., are executed mainly through the accumulator. [index register x (x), index register y (y)] both index register x and index re gister y are 8-bit registers. in the index addressing modes, the value of the operand is added to the contents of register x or register y and specifies the real address. when the t flag in the processor status register is set to ?1?, the value contained in index register x becomes the address for the second operand. [stack pointer (s)] the stack pointer is an 8-bit regi ster used during subroutine calls and interrupts. the stack is used to store the current address data and processor status when branching to subroutines or interrupt routines. the lower eight bits of the stack address are determined by the contents of the stack pointer. the upper eight bits of the stack address are determined by the stack page selection bit. if the stack page selection bit is ?0?, then the ram in the zero page is used as the stack area. if the stack page selection bit is ?1?, then ram in page 1 is used as the stack area. the stack page selection bit is located in the sfr area in the zero page. note that the initial value of the stack page selection bit varies with each microcomputer type. also some microcomputer types have no stack page selection bit and the upper eight bits of the stack a ddress are fixed. the operations of pushing register cont ents onto the stack and popping them from the stack are shown in figure 6. [program counter (pc)] the program counter is a 16-bit counter consisting of two 8-bit registers pch and pcl. it is used to indicate the address of the next instruction to be executed. fig 5. 740 family cpu register structure processor status register (ps) carry flag zero flag interrupt disable flag decimal mode flag break flag index x mode flag overflow flag negative flag b7 b0 b15 program counter stack pointer index register y index register x accumulator a x y s pc l pc h c z i d b t v n b7 b0 b7 b0 b7 b0 b7 b0 b7 b0
rev.2.00 mar 05, 2007 page 9 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 6. register push and pop at interrupt generation and subroutine call interrupt request (note) m(s) (pc h ) (s) (s) ? 1 m(s) (pc l ) ( s ) ( s ) ? 1 ..... execute rts subroutine (s) (s) + 1 (pc l ) m(s) (s) (s) + 1 (pc h ) m(s) m(s) (pc h ) (s) (s) ? 1 m(s) (pc l ) (s) (s) ? 1 m(s) (ps) (s) (s) ? 1 interrupt service routine (s) (s) + 1 (ps) m(s) (s) (s) + 1 (pc l ) m(s) (s) (s) + 1 (pc h ) m(s) execute jsr ..... execute rti store return address on stack store contents of processor status register on stack i flag ?0? to ?1? fetch the jump vector restore contents of processor status register restore return address restore return address store return address on stack note : the condition to enable the interrupt interrupt enable bit is ?1? interrupt disable flag is ?0? on-going routine table 4 push and pop instructions of accumulator or processor status register push instruction to stack p op instruction from stack accumulator pha pla processor status register php plp
rev.2.00 mar 05, 2007 page 10 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. [processor status register (ps)] the processor status register is an 8-bit register consisting of flags which indicate the status of th e processor after an arithmetic operation. branch operations can be performed by testing the carry (c) flag, zero (z) flag, ov erflow (v) flag, or the negative (n) flag. in decimal mode, the z, v, n flags are not valid. after reset, the interrupt disable (i) flag is set to ?1?, but all other flags are undefined. since the index x mode (t) and decimal mode (d) flags directly affect arithmetic operations, they should be initialized in the beginning of a program. bit 0: carry flag (c) the c flag contains a carry or borrow generated by the arithmetic logic unit (alu) immediately after an arithmetic operation. it can also be changed by a shift or rotate instruction. bit 1: zero flag (z) the z flag is set if the resu lt of an immediate arithmetic operation or a data transfer is ?0 ?, and cleared if the result is anything other than ?0?. bit 2: interrupt disable flag (i) the i flag disables all interrupts except for the interrupt generated by the brk instruct ion. interrupts are disabled when the i flag is ?1?. when an interrupt occurs, this flag is automatically set to ?1? to prevent other interrupts from interfering until the current interrupt is serviced. bit 3: decimal mode flag (d) the d flag determines whether additions and subtractions are executed in binary or decimal. binary arithmetic is executed when this flag is ?0?; decimal arithmetic is executed when it is ?1?. decimal correction is automatic in decimal mode. only the adc and sbc instructions can be used for decimal arithmetic. bit 4: break flag (b) the b flag is used to indicate that the current interrupt was generated by the brk instruction. the brk flag in the processor status register is always ?0?. when the brk instruction is used to generate an interrupt, the processor status register is pushed onto th e stack with the break flag set to ?1?. the saved processor stat us is the only place where the break flag is ever set. bit 5: index x mode flag (t) when the t flag is ?0?, arithmetic operations are performed between accumulator and memory, e.g. the results of an operation between two memory lo cations is stored in the accumulator. when the t flag is ?1?, direct arithmetic operations and direct data tr ansfers are enabled between memory locations, i.e. be tween memory and memory, memory and i/o, and i/o and i/o. in this case, the result of an arithmetic operation perf ormed on data in memory location 1 and memory locatio n 2 is stored in memory location 1. the address of memory location 1 is specified by index register x, and the address of memory location 2 is specified by normal addressing modes. bit 6: overflow flag (v) the v flag is used during the addition or subtraction of one byte of signed data. it is set if the result exceeds +127 to - 128. when the bit instructio n is executed, bit 6 of the memory location operated on by the bit instruction is stored in the overflow flag. bit 7: negative flag (n) the n flag is set if the result of an arithmetic operation or data transfer is negative. when the bit instruction is executed, bit 7 of the memory location operated on by the bit instruction is stored in the negative flag. [cpu mode register] cpum the cpu mode register contains the stack page selection bit. this register is allocated at address 003b 16 . fig 7. structure of cpu mode register the processor mode bits can be written only once after releasing reset. always set them to ?00 2 ?. after written, rewriting any data to these bits is disabled because they are locked. (emulator mcu is excluded.) also, the stack page bit (bit 2) is not locked. in order to prevent error-writing to the processor mode bits (at program runaway), write the cpu mode register at the start of the program that runs after releasing reset. table 5 set and clear instructions of each bit of processor status register c flag z flag i flag d flag b flag t flag v flag n flag set instruction sec ? sei sed ? set ?? clear instruction clc ? cli cld ? clt clv ? cpu mode register (cpum: address 003b 16 , initial value: 00 16 ) processor mode bits b1b0 0 0 : single-chip mode 0 1 : not available 1 0 : not available 1 1 : not available stack page selection bit 0 : 0 page 1 : 1 page disable (returns ?0? when read ) b7 b0
rev.2.00 mar 05, 2007 page 11 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. memory ? special function register (sfr) area the sfr area in the zero page contains control registers such as i/o ports and timers. ? ram ram is used for data storage a nd for a stack area of subroutine calls and interrupts. ?rom the first 128 bytes and the last 2 bytes of rom are reserved for device testing and the rest is a user area for storing programs. the user area includes the function set rom area. ? interrupt vector area the interrupt vector area contai ns reset and interrupt vectors. ? zero page the 256 bytes from addresses 0000 16 to 00ff 16 are called the zero page area. the internal ram and the special function registers (sfr) are allocated to this area. the zero page addressing mode can be used to specify memory and register addresses in the zero page area. access to this area with only 2 bytes is possible in the zero page addressing mode. ? special page the 256 bytes from addresses ff00 16 to ffff 16 are called the special page area. the special pa ge addressing mode can be used to specify memory addresses in the special page area. access to this area with only 2 bytes is possible in the special page addressing mode. ? function set rom area [renesas shipment test area] figure 8 shows the assignment of function set rom area. the random data are set to the renesas shipment test areas (addresses ffd4 16 to address ffd7 16 ). do not rewrite the data of these areas. when the checksum is included in the user program, avoid assigning it to these areas. [function set rom data] fsrom0, fsrom1, fsrom2 function set rom data 0 to 2 (addresses ffd8 16 to ffda 16 ) are used to set modes of peripheral functions. by setting values to these ar eas, the operation mode of each peripheral function are set after releasing reset. refer to the descriptions of peri pheral functions for the details of operation of peripheral functions. ? clock circuit ? watchdog timer ? low voltage de tection circuit [rom code protect] address ffdb 16 of qzrom version is rom code protect address and cannot be used for programming. ?00 16 ? is written into this address when selecting the protect bit write by using a serial programmer and selecting protect enabled for writing shipment by renesas tech nology corp.. when ?00 16 ? is set to the rom code protect address, th e protect func-tion is enabled, so that reading or writing from/to the corresponding area is disabled by a serial programmer. as for the qzrom product in blank, the rom code is protected by selecting the protect bit write at rom writing with a serial programmer. as for the qzrom product shipped after writing, ?00 16 ? (protect enabled) or ?ff 16 ? (protect disabled) is written into the rom code protect address when renesas technology corp. performs writing. the writing of ?00 16 ? or ?ff 16 ? can be selected as rom option setup (?mask option? written in the mask file converter) when ordering. (1) because the contents of ram are indefinite at reset, set initial values before using. (2) do not access to the reserved area. (3) random data is written into the renesas shipment test area and the reserved rom area. do not rewrite the data in these areas. data of these area ma y be changed without notice. accordingly, do not include th ese areas into programs such as checksum of all rom areas. (4) the qzrom values in function set rom data 0 to 2 set the operating modes of the various peripheral functions after an mcu reset is released. do not fail to set the value for the selected function. bits designated with a fixed value of 1 or 0 must be set to the designated value.
rev.2.00 mar 05, 2007 page 12 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 8. memory map diagram ram rom 0100 16 0000 16 0040 16 0440 16 ff00 16 xxxx 16 fffe 16 ffff 16 yyyy 16 zzzz 16 192 00ff 16 2 f800 16 f880 16 4 f000 16 f080 16 address function set rom data 2 ffdc 16 ffd4 16 ffd4 16 ffd5 16 ffd6 16 ffd7 16 ffd8 16 ffd9 16 ffda 16 ffdb 16 function set rom data 1 256 013f 16 renesas shipment test area renesas shipment test area renesas shipment test area renesas shipment test area function set rom data 0 rom code protect ram area ram capacity (bytes) address xxxx 16 rom area rom capacity (k bytes) address yyyy 16 address zzzz 16 function set rom sfr area disable interrupt vector area zero page special page reserved rom area reserved rom area (128 bytes) user rom area function set rom area reserved area 6 e800 16 e880 16
rev.2.00 mar 05, 2007 page 13 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 9. memory map of special function register (sfr) 0000 16 0001 16 0002 16 0003 16 0004 16 0005 16 0006 16 0007 16 0008 16 0009 16 000a 16 000b 16 000c 16 000d 16 000e 16 000f 16 0010 16 0011 16 0012 16 0013 16 0014 16 0015 16 0016 16 0017 16 0018 16 0019 16 001a 16 001b 16 001c 16 001d 16 001e 16 001f 16 0020 16 0021 16 0022 16 0023 16 0024 16 0025 16 0026 16 0027 16 0028 16 0029 16 002a 16 002b 16 002c 16 002d 16 002e 16 002f 16 0030 16 0031 16 0032 16 0033 16 0034 16 0035 16 0036 16 0037 16 0038 16 0039 16 003a 16 003b 16 003c 16 003d 16 003e 16 003f 16 port p0 (p0) port p0 direction register (p0d) port p1 (p1) port p1 direction register (p1d) port p2 (p2) port p2 direction register (p2d) port p3 (p3) port p3 direction register (p3d) reserved reserved reserved reserved port p0 drive capacity control register (dccr) port p0 pull-up control register (pull0) port p1 pull-up control register (pull1) key-on wakeup input sele ction register (keys) capture/compare register (low-order) (cral) capture/compare register (high-order) (crah) capture/compare register r/w pointer (ccrp) compare output mode register (cmom) timer a (low-order) (tal) timer a (high-order) (tah) reserved reserved transmit/receive buffer register (tb/rb) serial i/o status register (siosts) serial i/o control register (siocon) uart control register (uartcon) baud rate generator (brg) reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved prescaler 12 (pre12) timer 1 (t1) timer 2 (t2) timer mode register (tm) timer count source set register (tcss) compare register re-load register (cmpr) capture/compare port register (ccpr) capture/compare status register (ccsr) compare interrupt source set register (cisr) capture software trigger register (cstr) capture mode register (capm) reserved ad control register (adcon) ad conversion register (low-order) (adl) ad conversion register (high-order) (adh) clock mode register (clkm) oscillation stop detection register (clkstp) watchdog timer control register (wdtcon) interrupt edge selection register (intedge) cpu mode register (cpum) interrupt request register 1 (ireq1) interrupt request register 2 (ireq2) interrupt control register 1 (icon1) interrupt control register 2 (icon2) note 1: do not access to the reserved addresses.
rev.2.00 mar 05, 2007 page 14 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 10. structure of function set rom data 0 fig 11. structure of function set rom data 1 fig 12. structure of function set rom data 2 low voltage detection circuit valid bit 0: low voltage detection circuit invalid 1: low voltage detection circuit valid set ?0? to this bit certainly. set ?1? to this bit certainly. b7 function set rom data 0 (fsrom0: address ffd8 16 ) b0 oscillation method selection bits (note 1) b1 b0 0 0: clock pins not used (p2 0 /x out and p2 1 /x in are used as i/o ports) 0 1: ceramic resonator or quarts-crystal oscillator 1 0: 32 khz quarts-crystal oscillator 1 1: external clock input (p2 1 /x in pin is used as i/o port) low voltage detection circuit valid bit in the stop mode (note 2) 0: low voltage detection circuit invalid in the stop mode 1: low voltage detection circuit valid in the stop mode set ?0? to these bits certainly. set ?1? to this bit certainly. b7 function set rom data 1 fsrom1 (ffd9 16 ) b0 notes 1: the p2 0 /x out and p2 1 /x in pins build in an on-chip oscillator. even if these pins are used as i/o ports, the oscillator circuit is enabl ed when the mcu?s vcc voltage drops below the operation limit voltage. in this case these pins may output undefined values. 2: when the low voltage detection circuit is set to be valid in the stop mode, the dissipation current in the stop mode is increased. watchdog timer source clock selection bit 0 : low-speed on-chip oscillator/16 1 : system clock/16 watchdog timer start selection bit 0 : start watchdog timer 1 : stop watchdog timer watchdog timer h count source initial value selection bit 0 : initial value of bit 7 of wdtcon after reset release is ?0? 1 : initial value of bit 7 of wdtcon after reset release is ?1? stp instruction function selection bit 0 : system enters into the stop mode at the stp instruction execution 1 : internal reset occurs at the stp instruction execution low-speed on-chip oscillator control bit (note 1) 0 : stop of low-speed on-chip oscillator disabled 1 : stop of low-speed on-chip oscillator enabled set ?0? to these bits certainly. b7 function set rom data 2 fsrom2 (ffda 16 ) b0 note 1: if ?0? is set to this bit, it is not possible to write ?1? to bit 0 in the clock mode register. also, the low-speed on-chip oscillator does not stop even if the stp instruction is executed.
rev.2.00 mar 05, 2007 page 15 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. i/o ports [direction registers] pid the i/o ports have direction regi sters which determine the input/ output direction of each pin. ea ch bit in a direction register corresponds to one pin, and each pin can be set to be input or output. when ?1? is set to the bit corr esponding to a pin, this pin becomes an output port. when ?0 ? is set to the bit, the pin becomes an input port. when data is read from a pin se t to output, not the value of the pin itself but the value of port latc h is read. pins set to input are floating, and permit reading pin values. if a pin set to input is written to , only the port latch is written to and the pin remains floating. if the port p2 0 is used as output port, write ?1? to the port p2 0 direction regist er after reset. [port p0 drive capacity control register] dccr by setting the port p0 drive ca pacity control re gister (address 000c 16 ), the drive capacity of the n-channel output transistor for the port p0 can be selected. [pull-up control registers] pull0, pull1 by setting the pull-up cont rol registers (address 000d 16 and 000e 16 ), ports p0 and p1 can exert pull-up control by program. however, this is valid only when the port direct ion registers are set to input. when they are set to output, se tting ?pull-up on? does not pull up the ports. fig 13. structure of port p0 drive capacity control register fig 14. structure of port p0 pull-up control register fig 15. structure of port p1 control register b7 b0 port p0 0 drive capacity selection bit port p0 1 drive capacity selection bit port p0 2 drive capacity selection bit port p0 3 drive capacity selection bit port p0 4 drive capacity selection bit port p0 5 drive capacity selection bit port p0 6 drive capacity selection bit port p0 7 drive capacity selection bit 0: weakness 1: strength port p0 drive capacity control register (dccr: address 000c 16 , initial value: 00 16 ) b7 b0 p0 0 pull-up control bit p0 1 pull-up control bit p0 2 pull-up control bit p0 3 pull-up control bit p0 4 pull-up control bit p0 5 pull-up control bit p0 6 pull-up control bit p0 7 pull-up control bit 0: pull-up is disabled 1: pull-up is enabled port p0 pull-up control register (pull0: address 000d 16 , initial value: 00 16 ) b7 b0 p1 0 pull-up control bit p1 1 pull-up control bit p1 2 pull-up control bit p1 3 pull-up control bit p1 4 pull-up control bit p1 5 pull-up control bit p1 6 pull-up control bit p1 7 pull-up control bit 0: pull-up is disabled 1: pull-up is enabled port p1 pull-up control register (pull1: address 000e 16 , initial value: 00 16 )
rev.2.00 mar 05, 2007 page 16 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. table 6 i/o port function table note: 1. function set rom data 1 is included in the function set rom area. pin name i/o format non-port f unction sfrs related each pin p0 0 (led 0 )/int 0 p0 1 (led 1 )/int 1 i/o port p0 cmos compatible input level cmos 3-state output external interrupt input interrupt edge selection register port p0 drive capacity control register port p0 pull-up control register p0 2 (led 2 ) port p0 drive capacity control register port p0 pull-up control register p0 3 (led 3 )/cap 0 capture input capture/compare port register port p0 drive capacity control register port p0 pull-up control register p0 4 (led 4 )/r x d serial interface input/ output serial i/o control register port p0 drive capacity control register port p0 pull-up control register p0 5 (led 5 )/t x d serial i/o control register uart control register port p0 drive capacity control register port p0 pull-up control register p0 6 (led 6 )/s clk serial i/o control register port p0 drive capacity control register port p0 pull-up control register p0 7 (led 7 )/s rdy serial i/o control register port p0 drive capacity control register port p0 pull-up control register p1 0 /an 0 /key 0 /cmp 0 p1 1 /an 1 /key 1 / cmp 1 p1 2 /an 2 /key 2 / cmp 2 i/o port p1 compare output key input interrupt a/d conversion input capture/compare port register port p1 pull-up control register key-on wakeup input selection register ad control register p1 3 /an 3 /key 3 /t2 out timer 2 output key input interrupt a/d conversion input timer mode register port p1 pull-up control register key-on wakeup input selection register ad control register p1 4 /an 4 /key 4 p1 5 /an 5 /key 5 p1 6 /an 6 /key 6 p1 7 /an 7 /key 7 key input interrupt a/d conversion input port p1 pull-up control register key-on wakeup input selection register ad control register p2 0 /x out /x cout i/o port p2 cmos 3-state output clock pin function set rom data 1 (note) clock mode register p2 1 /x in /x cin cmos compatible input level cmos 3-state output clock pin function set rom data 1 (note) clock mode register p3 0 p3 1 i/o port p3
rev.2.00 mar 05, 2007 page 17 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 16. block diagram of pins (1) int 0 input data bus port latch pull-up control bit (1) port p0 0 drive capacity control bit data bus int 1 input (2) port p0 1 (3) port p0 2 (4) port p0 3 cap0 input (5) port p0 4 serial i/o input receive enable bit serial i/o enable bit (6) port p0 5 transmit enable bit p0 5 /t x d p-channel output disable bit (7) port p0 6 serial i/o mode selection bit serial i/o enable bit serial i/o synchronous clock selection bit serial i/o clock output (8) port p0 7 s rdy output enable bit serial i/o ready output represents a parasitic diode. no current flow is possible. ensure that the input voltage to each pin does not exceed the absolute maximum rating. note: port latch direction register direction register pull-up control bit drive capacity control bit pull-up control bit direction register data bus port latch drive capacity control bit pull-up control bit data bus direction register port latch drive capacity control bit pull-up control bit direction register port latch data bus drive capacity control bit data bus pull-up control bit direction register port latch drive capacity control bit pull-up control bit direction register port latch data bus drive capacity control bit pull-up control bit direction register port latch data bus drive capacity control bit serial i/o output serial i/o enable bit serial i/o enable bit serial i/o clock input serial i/o mode selection bit serial i/o enable bit
rev.2.00 mar 05, 2007 page 18 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 17. block diagram of pins (2) compare output port selection bit compare output port latch (10) port p1 3 timer2 output p1 3 /t 2out output valid bit a/d converter input key-on wakeup input selection bit analog input pin selection bit key input interrupt (11) port p1 4 - p1 7 (note) (12) port p2 0 , p2 1 pull-up control at stp p2 0 /x out /x cout oscillation mode selection bit (function set rom data 1) p2 1 /x in /x cin note: set to ?1? the port p2 0 direction register. clock input (13) port p3 0 , p3 1 (14) cnvss mode setting signal input qzrom programming power supply reset signal input (15) reset (9) port p1 0 , p1 1 , p1 2 data bus pull-up control bit direction register pull-up control bit direction register port latch data bus direction register port latch data bus data bus pull-up control bit direction register port latch direction register port latch data bus key-on wakeup input selection bit analog input pin selection bit key-on wakeup input selection bit analog input pin selection bit a/d converter input key input interrupt a/d converter input key input interrupt direction register port latch data bus represents a parasitic diode. no current flow is possible. ensure that the input voltage to each pin does not exceed the absolute maximum rating. note:
rev.2.00 mar 05, 2007 page 19 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. termination of unused pins ? termination of common pins i/o ports: select an input port or an output port and follow each processing method. output ports: open. input ports: if the input level become unstable, through current flow to an input circuit, and the power supply current may increase. especially, when expecting low consumption current (at stp or wit in struction execution etc.), pull-up or pull-down input ports to prevent through current (built-in resistor can be used). we recommend processing unused pins through a resistor which can secure ioh (avg) or iol (avg). because, when an i/o port or a pin which have an output function is selected as an input port, it may operate as an output port by incorrect operation etc. table 7 termination of unused pins pin termination p0 0 /int 0 perform termination of i/o port. p0 1 /int 1 p0 2 p0 3 p0 4 /r x d p0 5 /t x d p0 6 /s clk p0 7 /s rdy p1 0 /an 0 /key 0 /cmp 0 p1 1 /an 1 /key 1 /cmp 1 p1 2 /an 2 /key 2 /cmp 2 p1 3 /an 3 /key 3 /t2 out p1 4 /an 4 /key 4 p1 5 /an 5 /key 5 p1 6 /an 6 /key 6 p1 7 /an 7 /key 7 p2 0 /x out /x cout set the direction register to ?1?, and perform termination of output port. p2 1 /x in /x cin perform termination of i/o port. p3 0 p3 1
rev.2.00 mar 05, 2007 page 20 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. interrupts interrupts occur by 13 different sources : 5 external sources, 7 internal sources and 1 software source. ? interrupt control all interrupts except the brk instruction interrupt have an interrupt request bit and an interrupt enable bit, and they are controlled by the interrupt di sable flag. when the interrupt enable bit and the interrupt reque st bit are set to ?1? and the interrupt disable flag is set to ?0?, an interrupt is accepted. the interrupt request bit can be cleared by program but not be set. the interrupt enable bit can be set and cleared by program. the reset and brk instruction interrupt can never be disabled with any flag or bit. all interr upts except these are disabled when the interrupt disable flag is set. when several interrupts occur at the same time, the interrupts are received according to priority. ? interrupt operation upon acceptance of an interrup t the following operations are automatically performed: 1. the processing being executed is stopped. 2. the contents of the progra m counter and processor status register are automatically pushed onto the stack. 3. the interrupt disable flag is set and the corresponding inter- rupt request bit is cleared. 4. concurrently with the push ope ration, the interrupt destina- tion address is read from the vector table into the program counter. [interrupt edge selection register] intedge the valid edge of external interrupt int 0 and int 1 can be selected by the interrupt edge selection bit, respectively. [key-on wakeup input selection register] keys either of enable or disable of key-on wakeup for pins p1 0 to p1 7 can be selected by the key- on wakeup input selection bit, respectively. fig 18. structure of key-on wakeup input selection register ? notes on use (1) when setting the followings, the interrupt request bit may be set to ?1?. ? when switching external interrupt active ed ge related register: interrupt edge selecti on register (address 003a 16 ) capture mode register (address 0032 16 ) when not requiring th e interrupt occurren ce synchronized with these setting, take the following sequence. 1. set the corresponding interrupt enable bit to ?0? (disabled). 2. set the interrupt edge select bit (active edge switch bit, trig- ger mode bit). 3. set the corresponding interrupt request bit to ?0? after 1 or more instructions ha ve been executed. 4. set the corresponding interrupt enable bit to ?1? (enabled). b7 b0 key-on wakeup input selection register keys (000f 16 ), initial value: 00 16 port p1 0 key-on wakeup input selection bit port p1 1 key-on wakeup input selection bit port p1 2 key-on wakeup input selection bit port p1 3 key-on wakeup input selection bit port p1 4 key-on wakeup input selection bit port p1 5 key-on wakeup input selection bit port p1 6 key-on wakeup input selection bit port p1 7 key-on wakeup input selection bit 0: disable 1: enable ? ? ? ? ? ? ? ? ?
rev.2.00 mar 05, 2007 page 21 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. table 8 interrupt vector address and priority notes: 1. vector addressed contain inter nal jump destination addresses. 2. reset function in the same way as an interrupt with the highest priority. interrupt source priority vector addresses (note 1) interrupt request generating conditions remarks high- order low- order reset (note 2) 1 fffd 16 fffc 16 at reset input non-maskable serial i/o receive 2 fffb 16 fffa 16 at completion of serial i/o data receive v alid only when serial i/o is selected serial i/o transmit 3 fff9 16 fff8 16 at completion of serial i/o transmit shift or when transmit buffer is empty valid only when serial i/o is selected int 0 4fff7 16 fff6 16 at detection of either rising or falling edge of int 0 input external interrupt (active edge selectable) int 1 5fff5 16 fff4 16 at detection of either rising or falling edge of int 1 input external interrupt (active edge selectable) key-on wakeup 6 fff3 16 fff2 16 at falling of conjunction of input logical level for port p1 (at input) external interrupt (valid at falling edge) capture 7 fff1 16 fff0 16 at detection of either rising or falling edge of capture 0 input external interrupt (active edge selectable) compare 8 ffef 16 ffee 16 at compare matched compare in terrupt source is selected. timer a 9 ffed 16 ffec 16 at timer a underflow timer 210ffeb 16 ffea 16 at timer 2 underflow a/d conversion 11 ffe9 16 ffe8 16 at completion of a/d conversion timer 112ffe7 16 ffe6 16 at timer 1 underflow stp release timer underflow not used 13 ffe5 16 ffe4 16 14 ffe3 16 ffe2 16 15 ffe1 16 ffe0 16 16 ffdf 16 ffde 16 brk instruction 17 ffdd 16 ffdc 16 at brk instruction execution non-maskable software interrupt
rev.2.00 mar 05, 2007 page 22 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 19. interrupt control fig 20. structure of interrupt-related registers interrupt disable flag i interrupt request interrupt request bit interrupt enable bit brk instruction reset b7 b0 int 0 interrupt edge selection bit 0: falling edge active 1: rising edge active int 1 interrupt edge selection bit 0: falling edge active 1: rising edge active not used (returns ?0? when read) interrupt edge selection register (intedge: address 003a 16 , initial value: 00 16 ) b7 b0 interrupt request register 1 (ireq1: address 003c 16 , initial value: 00 16 ) serial i/o receive interrupt request bit serial i/o transmit interrupt request bit int 0 interrupt request bit int 1 interrupt request bit key-on wake up interrupt request bit capture interrupt request bit compare interrupt request bit timer a interrupt request bit 0: no interrupt request issued 1: interrupt request issued b7 b0 b7 b0 b7 b0 interrupt request register 2 (ireq2: address 003d 16 , initial value: 00 16 ) timer 2 interrupt request bit a/d conversion interrupt request bit timer 1 interrupt request bit not used (returns ?0? when read) (do not write ?1? to this bit) 0: no interrupt request issued 1: interrupt request issued interrupt control register 1 (icon1: address 003e 16 , initial value: 00 16 ) serial i/o receive interrupt enable bit serial i/o transmit interrupt enable bit int 0 interrupt enable bit int 1 interrupt enable bit key-on wake up interrupt enable bit capture interrupt enable bit compare interrupt enable bit timer a interrupt enable bit 0: interrupts disabled 1: interrupts enabled interrupt control register 2 (icon2: address 003f 16 , initial value: 00 16 ) timer 2 interrupt enable bit a/d conversion interrupt enable bit timer 1 interrupt enable bit not used (returns ?0? when read) (do not write ?1? to this bit) 0: interrupts disabled 1: interrupts enabled
rev.2.00 mar 05, 2007 page 23 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. key input interrupt (key-on wakeup) a key-on wakeup interrupt request is generated by applying ?l? level to any pin of port p1 that has been set to input mode. in other words, it is generated when the and of input level goes from ?1? to ?0?. an example of using a key input interrupt is shown in figure 18, where an in terrupt request is generated by pressing one of the keys provid ed as an active-low key matrix which uses ports p1 0 to p1 3 as input ports. fig 21. connection example when using key input interrupt and port p1 block diagram port pxx level output port p1 pull-up control register bit 7 = port p1 7 latch port p1 7 direction register = ** * p1 7 output key input interrupt request * p-channel transistor for pull-up ** cmos output buffer port p1 pull-up control register bit 6 = port p1 6 latch port p1 6 direction register = ** * p1 6 output bit 5 = port p1 5 latch port p1 5 direction register = ** * p1 5 output bit 4 = port p1 4 latch port p1 4 direction register = ** * p1 4 output bit 3 = port p1 3 latch port p1 3 direction register = ** * p1 3 input bit 2 = port p1 2 latch port p1 2 direction register = ** * p1 2 input bit 1 = port p1 1 latch port p1 1 direction register = ** * p1 1 input bit 0 = port p1 0 latch port p1 0 direction register = ** * p1 0 input falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection port p1 0 key-on wakeup selection bit port p1 6 key-on wakeup selection bit ?l? ?0? ?0? ?0? ?0? ?1? ?1? ?1? ?1? ?1? ?1? ?1? ?1? ?0? ?0? ?0? ?0? port p1 input read circuit port p1 7 key-on wakeup selection bit port p1 pull-up control register port p1 pull-up control register port p1 pull-up control register port p1 pull-up control register port p1 pull-up control register port p1 4 key-on wakeup selection bit port p1 3 key-on wakeup selection bit port p1 2 key-on wakeup selection bit port p1 pull-up control register port p1 1 key-on wakeup selection bit port p1 5 key-on wakeup selection bit
rev.2.00 mar 05, 2007 page 24 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. timers the 7549 group has two 8-bit time rs (timer 1 and timer 2) and one 16-bit timer (timer a). timer 1 and timer 2 share the same 8-bit prescaler (prescaler 12). each timer and prescaler has a separate timer latch and prescaler latch. the division ratio of every timer and prescaler is 1/(n+1), where n is the value of the timer latch or prescaler latch. the timers decrement at each count clock input. when the count value reaches ?0?, an underflow occurs at the next count pulse. the value of the corresponding timer latch is reloaded into the timer at underflow and counti ng is continued. when a timer underflow occurs, the interrupt request bit corresponding to each timer is set to ?1?. ? prescaler 12 (pre12) prescaler 12 is an 8-bit prescaler that counts the signal selected by the prescaler 12 count source selection bit. the count source can be selected from source/16 and x cin input clock. writing to prescaler 12 writes the value to both the prescaler latch and prescaler. reading from prescaler 12 read s the prescaler 12 count value. the initial value is set to ?ff 16 ? after reset. the division ratio of prescaler 12 is 1/(n+1), where n is the setting value. prescaler 12 cannot stop counting by software. ? timer 1 (t1) timer 1 is an 8-bit timer that counts the pres caler 12 output. when timer 1 underflows, the timer 1 interrupt request bit is set to ?1?. writing to timer 1 writes the value to both the timer 1 latch and timer 1. reading from timer 1 reads the timer 1 count value. the initial value is set to ?01 16 ? after reset. the division ratio of timer 1 is 1/(m+1), where m is the setting value. this gives that the divisi on ratio of prescaler 12 and timer 1 is 1/((n+1) (m+1)), where n is the prescaler 12 setting value and m is the timer 1 setting value. timer 1 cannot stop counting by software. ? timer 2 (t2) timer 2 is an 8-bit timer that counts the signal selected by the timer 2 count source selection bit. the count source can be selected from among source/16, /256, prescaler 12 output, and timer a output signal. timer 2 counts the selected co unt source and sets the timer 2 interrupt reque st bit to ?1? at underflow. when writing to timer 2, the value of the timer 2 write control bit can be used to select a write to both the timer 2 latch and timer 2 or a write to only the timer 2 latch. reading from timer 2 reads the timer 2 count value. timer 2 starts counting from ?ff 16 ? after reset. the division ratio of timer 2 is 1/(n+1), where n is the timer 2 setting value. timer 2 stops when the timer 2 count stop bit is set to ?1?. when the p1 3 /t2 out output valid bit is set to ?1?, the polarity of the waveform output from the p1 3 /t2 out pin can be inverted at each timer 2 underflow. the out put start level of the t2 out pin can be selected using the t2 out polarity switch bit. when this bit is set to 0, the output starts at ?h? level. when this bit is set to ?1?, the output starts at ?l? level. ? notes on timers 1 and 2 (1) reading from and writing to timer 1 and 2 and prescaler 12 if the timer/prescaler c ount source clock and source are different clocks, the timers and prescaler cannot be read or written. select the same clock to enable read and write operations. note that timer 2 can be read and written even using a different clock while it s counting is stopped. 1 prescaler 12 and timer 1 cannot be read/written in the following conditions: prescaler 12 count source: x cin input clock source: clock other than x cin input clock 2 timer 2 cannot be read/written during counting in the following conditions: timer 2 count source: prescaler 12 prescaler 12 count source: x cin input clock source: clock other than x cin input clock or timer 2 count source: timer a underflow timer a count source: x cin input clock source: clock other than x cin input clock or timer 2 count source: timer a underflow timer a count source: low-speed on-chip oscillator output source: clock other than low-speed on-chip oscillator (2) count source of prescaler 12 the x cin input clock can be selected as the prescaler count source only if the 32 khz quartz crystal oscillator is selected by the oscillation method selection bit in fsrom1.
rev.2.00 mar 05, 2007 page 25 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 22. structure of timer mode register fig 23. structure of timer count source set register fig 24. block diagram of timer 1 and timer 2 b7 b0 timer mode register (tm: address 002b 16 , initial value: 00 16 ) not used (return ?0? when read) timer 2 count stop bit 0: count start 1: count stop p1 3 /t2 out output valid bit 0: pulse output invalid (i/o port) 1: pulse output valid t2 out polarity selection bit 0: start from ?h? level 1: start from ?l? level timer 2 write control bit 0: write to latch and timer simultaneously 1: write to only latch timer a write control bit 0: write to latch and timer simultaneously 1: write to only latch timer a count stop bit 0: count start 1: count stop not used (return ?0? when read) b7 b0 timer count source set register (tcss: address 002c 16 , initial value: 00 16 ) timer 2 count source selection bit b1 b0 0 0 : source/16 0 1 : source/256 1 0 : prescaler 12 output 1 1 : timer a underflow signal timer a count source selection bit (note 1) b4 b3 b2 0 0 0 : source/16 0 0 1 : source/2 0 1 0 : source/32 0 1 1 : source/64 1 0 0 : source/128 1 0 1 : source/256 1 1 0 : low-speed on-chip oscillator output 1 1 1 : x cin input clock (32khz quartz crystal oscillation) prescaler 12 count source selection bit 0 : source/16 1 : x cin input clock (32khz quartz crystal oscillation) not used (return ?0? when read) note 1: source is the clock selected by bits 5 and 4 in the clock mode register (0037 16 ). the timer count sources are not affected by bits 7 and 6, the cpu clock dividing ratio select bits. data bus timer 1 interrupt request source/16 x cin input clock (32khz quartz crystal oscillation) data bus prescaler 12 latch (8) timer 1 latch (8) prescaler 12 (8) timer 1 (8) source/256 source/16 timer 2 count stop bit timer 2 count source selection bit prescaler 12 count source selection bit timer 2 interrupt request timer 2 latch (8) timer 2 (8) timer a underflow timer 2 write control bit toggle flip-flop t q q p1 3 /t2 out output valid bit r t2 out polarity selection bit ?1? ?0? p1 3 /t2 out output valid bit port p1 3 latch port p1 3 direction register p1 3 /t2 out
rev.2.00 mar 05, 2007 page 26 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. timer a (ta) timer a is a 16-bit timer and c ounts the signal selected by the timer a count sour ce selection bit. the count source of timer a can be selected from among source/2, /16, /32, /64, /128, /256, low-speed on-ship oscillator clock, and x cin input clock. timer a counts the selected count source and sets the timer a interrupt request bit to ?1?. when writing to timer a, the se tting value of the timer a write control bit can be used to select a write to both the timer a latch and timer or a write to only the timer a latch. reading from timer a reads the timer a count value. be sure to write to and read from the low-order and the higher order of timer a in the following order: ?read read the high-order of timer a (tah) first, and the low- order of timer a (tal) next. always read both of the registers. ? write write to the low-order of timer a (tal) first and the high-order of timer a next. always read both of the registers. counting starts from ?ffff 16 ? after reset. the division ratio of timer a is 1/(n+1), where n is the timer a setting value. timer a stops when the timer a count stop bit is set to ?1?. timer a can be used as the t iming timer for in put capture and output compare functions. ?notes on timer a (1) timer value setting when the timer a write control bit is set to ?write to only latch?, written data is written to only to the latch even when the timer is stopped. to set the init ial setting value when the timer is stopped, select ?write to timer and latch simultaneously? beforehand. (2) reading from and writing to timer a if the timer a count source clock and source are different clocks, timer a cannot be read or written during its counting. select the same clock or set timer a to stop counting to enable read and write operations. ? timer a cannot be read/written in the following conditions: timer a count source: x cin input clock source: clock other than x cin input clock or timer a count source: low-sp eed on-chip oscillator output source: clock other than lo w-speed on-chip oscillator (3) count source of timer a the x cin input clock can be selected as the count source of timer a only if the 32 khz quartz crysta l oscillator is selected by the oscillation method se lection bit in fsrom1. fig 25. block diagram of timer a data bus low-speed on-chip oscillator output source/256 source/128 source/64 source/32 source/16 source/2 timer a (low-order) latch (8) x cin input clock (32 khz quart crystal oscillator) timer a (high-order) latch (8) timer a (low-order) (8) timer a (high-order) (8) timer a write control bit timer a interrupt request compare capture timer a count stop bit timer a count source selection bits
rev.2.00 mar 05, 2007 page 27 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. output compare 7549 group has 3-output compar e channels. each channel (0 to 2) has the same function and can be used to output waveform by using count value of timer a. three output compare channels sh are the registers with the input capture (one channel), but their individual circuits operate independently so that all the ch annels can be used at the same time. to use each compare channel, set ?1? to the compare x (x = 0, 1, 2, 3) output port bit and se t the port direction register corresponding to compare channel to output mode. the compare value for each channel is set to the capture/compare register (low-order) and captur e/compare register (high-order). writing to the register for each channel is controlled by setting value of capture/compare register rw pointer. writing to each register is in the following order; 1. set the corresponding compare latch to the capture/compare register rw pointer. 2. write a value to the capture/compare register (low-order) and capture/compare register (high-order). (it doesn?t care even if either low-order or high-order is written early.) 3. set ?1? to the compare latch y (y = 00, 01, 10, 11, 20, 21) re-load bit. when ?1? is set to the compare latch y re-load bit, the value set to the compare register is loaded to compare latch when the next timer underflow. after loading, re-load bit is set to ?0? automatically. when the count value of timer a matches the compare latch setting value, a trigger to the co mpare output circuit is generated. the trigger can be enabled or disabled using the compare x trigger enable bit. when the compare x trigger enable bit is set to 1, the output waveform from the port is as follows. ? when the value of the compare x output level latch is ?0? high level at compare latch x0 match low level at compare latch x1 match ? when the value of the compare x output level latch is ?1? low level at compare latch x0 match high level at compare latch x1 match the output waveform does not ch ange if the compare x trigger enable bit is set to 0, so the port output remains fixed at high or low level. the compare output level of each channel can be confirmed by reading the compare x output status bit. compare interrupt is available when match of each compare channel and timer count value. th e interrupt request from each channel can be disabl ed or enabled by setting value of compare latch y interrupt source selection bit. ? notes on output compare (1) if timer a is stopped, when a value is written to the capture/ compare register it is immediately transferred to the compare latch. in addition, if timer a is stopped and the compare x trigger enable bit is set to ?1?, the output latch is initialized. (2) do not write the same data to both of compare latch x0 and x1. (3) when setting value of the compare latch is larger than timer setting value, compare matc h signal is not generated. accordingly, the output waveform is fixed to ?l? or ?h? level. however, when setting value of another compare latch is smaller than timer setting value, this compare match signal is generated. accordingly, compare interrupt occurs. (4) when the compare x trigger enable bit is cleared to ?0? (disabled), the match trigger to the waveform output circuit is disabled, and the output wave form can be fixed to ?l? or ?h? level. however, in this case, the compare match signal is generated. accordingly, compare interrupt occurs. fig 26. structure of capture/compare register fig 27. structure of capture/compare register rw pointer fig 28. structure of compare register re-load register fig 29. structure of capture/compare port register b7 b0 capture/compare register (low-order) (cral: address 0010 16 , initial value: 00 16 ) b7 b0 capture/compare register (high-order) (crah: address 0011 16 , initial value: 00 16 ) b7 b0 capture/compare register rw pointer (ccrp: address 0012 16 , initial value: 00 16 ) capture/compare register rw pointer b2 b1 b0 0 0 0 : compare latch 00 0 0 1 : compare latch 01 0 1 0 : compare latch 10 0 1 1 : compare latch 11 1 0 0 : compare latch 20 1 0 1 : compare latch 21 1 1 0 : capture latch 00 1 1 1 : capture latch 01 not used (returns ?0? when read) b7 b0 compare register re-load register (cmpr: address 002d 16 , initial value: 00 16 ) compare latch 00, 01 re-load bit 0: re-load disabled 1: re-load at next underflow compare latch 10, 11 re-load bit 0: re-load disabled 1: re-load at next underflow compare latch 20, 21 re-load bit 0: re-load disabled 1: re-load at next underflow not used (returns ?0? when read) b7 b0 capture/compare port register (ccpr: address 002e 16 , initial value: 00 16 ) capture input port bits 0: capture from p0 3 1: low-speed on-chip oscillator/16 compare 0 output port bit 0: p1 0 is i/o port 1: p1 0 is compare 0 output compare 1 output port bit 0: p1 1 is i/o port 1: p1 1 is compare 1 output compare 2 output port bit 0: p1 2 is i/o port 1: p1 2 is compare 2 output not used (returns ?0? when read)
rev.2.00 mar 05, 2007 page 28 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 30. structure of compare output mode register fig 31. structure of capture/compare status register fig 32. structure of compare interrupt source register b7 b0 compare output mode register (cmom: address 0013 16 , initial value: 00 16 ) compare 0 output level latch 0: positive 1: negative compare 1 output level latch 0: positive 1: negative compare 2 output level latch 0: positive 1: negative compare 0 trigger enable bit 0: disabled 1: enabled compare 1 trigger enable bit 0: disabled 1: enabled compare 2 trigger enable bit 0: disabled 1: enabled not used (returns ?0? when read) b7 b0 capture/compare status register (ccsr: address 002f 16 , initial value: 00 16 ) compare 0 output status bit 0: ?l? level output 1: ?h? level output compare 1 output status bit 0: ?l? level output 1: ?h? level output compare 2 output status bit 0: ?l? level output 1: ?h? level output capture 0 status bit 0: latch 00 captured 1: latch 01 captured not used (returns ?0? when read) b7 b0 compare interrupt source register (cisr: address 0030 16 , initial value: 00 16 ) compare latch 00 interrupt source bit compare latch 01 interrupt source bit compare latch 10 interrupt source bit compare latch 11 interrupt source bit compare latch 20 interrupt source bit compare latch 21 interrupt source bit not used (returns ?0? when read) 0: disabled 1: enabled
rev.2.00 mar 05, 2007 page 29 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 33. block diagram of compare output circuit fig 34. block diagram of compare channel 0 timer a latch timer a counter compare channel 0 compare latch 00 compare latch 01 output waveform latch 0 p1 0 /cmp 0 compare channel 1 compare channel 2 p1 1 /cmp 1 p1 2 /cmp 2 data bus compare buffer 00 (16) compare latch 00 (16) compare buffer 01 (16) compare latch 01 (16) compare register capture/compare register r/w pointer (0012 16 , bits 0 to 2) compare latch 00, 01 reload bit (002d 16 , bit 0) timer a counter (16) output waveform latch 0 compare 0 trigger enable bit (0013 16 , bit 3) compare 0 output level latch (0013 16 , bit 0) compare 0 output status bit (002f 16 , bit 0) p1 0 /cmp 0 compare latch 00 interrupt source selection bit (0030 16 , bit 0) compare latch 01 interrupt source selection bit (0030 16 , bit 1) compare interrup compare 0 output port selection bit (001e 16 , bit 2) i/o port
rev.2.00 mar 05, 2007 page 30 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 35. output compare mode (general waveform) fig 36. output compare mode (compare register write timing) timer a count clock timer a underflow timer a count value compare interrupt compare latch 01 000b 000c 000d 000e 000f 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 0 1 0 000b 0005 re-load the count value compare latch 00 compare 00 match compare 01 match compare output compare status bit note: compare interrupt occurs only for the interrupt source selected by compare interrupt source register. timer a count clock timer a underflow timer a count value compare latch 00, 01 re-load signal compare latch 01 000b 000c 000d 000e 000f 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 0 1 0 000b 0005 compare latch 00 compare latch 00 write compare latch 01 write compare latch 00, 01 re-load bit compare status bit 000c 000e 10 compare 00 match compare 01 match compare output compare interrupt re-load the count value
rev.2.00 mar 05, 2007 page 31 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. input capture 7549 group has 1-input capture channel and can be used to capture count value of timer a. input capture shares the regist ers with three output capture channels, but their individual circuits operate independently so that all the channels can be used at the same time. to use input capture, set the input capture port selection bits. if p0 3 is selected, set the p0 3 direction register to 0. when an input capture trigger is input to the input capture circuit, the count value of timer a is saved to the capture latches. the timer count value at the rising edge of the external input trigger is saved to capture latch 00, and the timer count value at the falling edge of the external input trigger is saved to capture latch 01. capture latch 00 and capture latch 01 can be read using the following procedure. 1. set the capture/compare register r/w pointer to the read target address. 2. read the high-order bits of the capture/compare registers, then read the low-order bits of the capture/compare regis- ters. (read both the capture/compare registers in the sequence of high-order bits followed by low-order bits.) the count value of timer can be retained by software by capture y (y = 00, 01, 10, 11) software tr igger bit too. when ?1? is set to this bit, count value of timer is retained to the corresponded capture latch. when reading from the capture y so ftware trigger bit is executed, ?0? is read out. ? notes on input capture ? when the low-speed on-chip oscillator output or x cin input clock is selected as the coun t source of timer a, input capture can be used only if the same clock source is selected as source and as the count source of timer a. ? when writing ?1? to capture y so ftware trigger bit of capture latch 00 and 01 at the same time, or external trigger and software trigger occur simultan eously, if capture latches 00 and 01 are input simultaneously, the set value of capture 0 status bit is undefined. ? when setting the interrupt active edge selection bit and noise filter clock selection bit of captupe 0 the interrupt request bit may be set to ?1?. when not requiring the interrupt occurrence synchronized with these setting, take th e following sequence. (1) set the capture interrupt enable bit to ?0? (disabled). (2) set the interrupt edge selection bit or noise filter clock selection bit. (3) set the corresponding interrupt request bit to ?0? after 1 or more instructions have been executed. (4) set the capture interrupt enable bit to ?1? (enabled). ? when the capture interrupt is us ed as the interrupt for return from stop mode, set the capture 0 noise filter clock selection bits to ?00 (filter stop)?. fig 37. structure of capture software trigger register fig 38. structure of capture mode register b7 b0 capture software trigger register (cstr: address 0031 16 , initial value: 00 16 ) capture latch 00 software trigger bit capture 00 software trigger occurs by setting ?1? to this bit. (returns ?0? when read) capture latch 01 software trigger bit capture 01 software trigger occurs by setting ?1? to this bit. (returns ?0? when read) not used (returns ?0? when read) b7 b0 capture 0 interrupt edge selection bits b1 b0 0 0 : rising and falling edge 0 1 : rising edge 1 0 : falling edge 1 1 : not available capture 0 noise filter clock selection bits b1 b0 0 0 : filter stop 0 1 : f (x in ) 1 0 : f (x in )/8 1 1 : f (x in )/32 not used (returns ?0? when read) capture mode register (capm: address 0032 16 , initial value: 00 16 )
rev.2.00 mar 05, 2007 page 32 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 39. block diagram of capture channel 0 fig 40. capture input waveform (capture interrupt edge selection bit = ?rising edge?) fig 41. capture input waveform (capture interrupt edge selection bit = ?rising and falling edge?) data bus capture register capture/compare register rw pointer (0012 16 , bits 0-2) capture latch 0 (16) capture trigger capture pointer capture latch 0x software trigger bits (0031 16 , bits 0, 1) p0 3 / cap 0 capture latch 00 (16) capture latch 01 (16) rising falling capture 0 interrupt edge selection bits (0032 16 , bits 0, 1) capture interrupt timer a counter (16) digital filter capture 0 status bit (002f 16 , bit 3) low-speed on-chip oscillator/16 capture 0 noise filter clock selection bits (0032 16 , bits 2, 3) capture 0 input port selection bit (002e 16 , bit 0) timer a underflow capture input wave timer a count value capture latch 00 000b 000c 000d 000e 000f 0000 0002 0003 0004 0005 0006 0007 0008 0009 000b 000c xxxx re-load the timer a count value capture latch 01 capture 0 interrupt capture 0 status bit xxxx 1 0 1 000a 0001 000c 0005 000f 010 overwrite 0001 000a timer a underflow 000b 000c 000d 000e 000f 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c xxxx xxxx 1 0 1 000a 0001 000c 0005 000f 010 capture input wave timer a count value capture latch 00 capture latch 01 capture 0 interrupt capture 0 status bit re-load the timer a count value overwrite
rev.2.00 mar 05, 2007 page 33 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. serial interface ? serial i/o serial i/o can be used as either clock synchronous or asynchronous (uart) serial i/ o. a dedicated timer is also provided for baud rate generation. (1) clock synchronous serial i/o mode clock synchronous serial i/o mode can be selected by setting the serial i/o mode selecti on bit of the serial i/ o control register (bit 6) to ?1?. for clock synchronous serial i/o, the transmitter and the receiver must use the same clock. if an internal clock is used, transfer is started by a write signal to the tb/rb. fig 42. block diagram of clock synchronous serial i/o fig 43. operation of clock synchronous serial i/o function serial i/o control register receive buffer register 1 receive shift register 1 clock control circuit 1/4 baud rate generator source 1/4 clock control circuit falling-edge detector transmit buffer register transmit shift register serial i/o status register f/f address 0018 16 receive buffer full flag (rbf) receive interrupt request (ri) shift clock serial i/o synchronous clock selection bit frequency division ratio 1/(n+1) address 001c 16 brg count source selection bit address 0018 16 shift clock transmit shift completion flag (tsc) transmit buffer empty flag (tbe) transmit interrupt request (ti) transmit interrupt source selection bit address 0019 16 address 001a 16 data bus data bus p0 6 /s clk p0 4 /r x d p0 5 /t x d p0 7 /s rdy d 7 d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 0 d 1 d 2 d 3 d 4 d 5 d 6 rbf = 1 tsc = 1 tbe = 0 tbe = 1 tsc = 0 transfer shift clock (1/2 to 1/2048 of the internal clock, or an external clock) serial output txd serial input rxd write pulse to receive/transmit buffer register 1 (address 0018 16 ) overrun error (oe) detection notes 1: as the transmit interrupt (ti), which can be selected, either when the transmit buffer has emptied (tbe=1) or after the transmit shift operation has ended (tsc=1), by setting the transmit interrupt source selection bit (tic) of the serial i/o control register. 2: if data is written to the transmit buffer register when tsc=0, the transmit clock is generated continuously and serial data is output continuously from the txd pin. 3: the receive interrupt (ri) is set when the receive buffer full flag (rbf) becomes ?1? . receive enable signal s rdy
rev.2.00 mar 05, 2007 page 34 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. (2) asynchronous serial i/o (uart) mode clock asynchronous serial i/o mode (uart) can be selected by clearing the serial i/o mode select ion bit of the serial i/o control register to ?0?. eight serial data transfer formats can be selected, and the transfer formats used by a transmitter and receiver must be identical. the transmit and receive shift re gisters each have a buffer, but the two buffers have the same address in memory. since the shift register cannot be written to or read from directly, transmit data is written to the transmit buffer register, and receive data is read from the receive buffer register. the transmit buffer register can also hold the next data to be transmitted, and the receive buffer register can hold a character while the next characte r is being received. fig 44. block diagram of uart serial i/o fig 45. operation of uart serial i/o function 1/4 oe pe fe 1/16 1/16 data bus data bus receive buffer register address 0018 16 receive shift register receive buffer full flag (rbf) receive interrupt request (ri) baud rate generator frequency division ratio 1/(n+1) address 001c 16 st/sp/pa generator transmit buffer register transmit shift register address 0018 16 transmit shift completion flag (tsc) transmit buffer empty flag (tbe) transmit interrupt request (ti) address 0019 16 st detector sp detector uart control register address 001b 16 character length selection bit address 001a 16 brg count source selection bit transmit interrupt source selection bit serial i/o1 synchronous clock selection bit clock control circuit character length selection bit 7 bits 8 bits serial i/o1 status register serial i/o 1 control register p0 6 /s clk p0 4 /r x d p0 5 /t x d source tsc=0 tbe=1 rbf=0 tbe=0 tbe=0 rbf=1 rbf=1 tbe=1 tsc=1* st d 0 d 1 sp d 0 d 1 st sp transmit or receive clock transmit buffer write signal serial output t x d receive buffer read signal serial input r x d * generated at 2nd bit in 2-stop-bit mode 1 start bit 7 or 8 data bit 1 or 0 parity bit 1 or 2 stop bit (s) notes 1: error flag detection occurs at the same time that the rbf flag becomes ?1? (at 1st stop bit, during reception). 2: as the transmit interrupt (ti), when either the tbe or tsc flag becomes ?1?, can be selected to occur depending on the settin g of the transmit interrupt source selection bit (tic) of the serial i/o1 control register. 3: the receive interrupt (ri) is set when the rbf flag becomes ?1?. 4: after data is written to the transmit buffer when tsc=1, 0.5 to 1.5 cycles of the data shift cycle is necessary until changin g to tsc=0. st d 0 d 1 sp d 0 d 1 st sp
rev.2.00 mar 05, 2007 page 35 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. [transmit buffer register/r eceive buffer register (tb/ rb)] 0018 16 the transmit buffer register and the receive buffer register are located at the same address. the transmit buffer is write-only and the receive buffer is read-only. if a character bit length is 7 bits, the msb of data stored in the receive buffer is ?0?. [serial i/o status register (siosts)] 0019 16 the read-only serial i/o status re gister consists of seven flags (bits 0 to 6) which indicate the operating status of the serial i/o function and various errors. three of the flags (bits 4 to 6) are valid only in uart mode. the receive buffer full flag (bit 1) is cleared to ?0? when the receive buffer register is read. if there is an error, it is detect ed at the same time that data is transferred from the receive shift register to the receive buffer register, and the receive buffer full flag is set. a write to the serial i/o status register clears all the error flags oe, pe, fe, and se (bit 3 to bit 6, respectively). writing ?0? to the serial i/o enable bit sioe (bit 7 of the serial i/o control register) also clears all the status flags, including the error flags. bits 0 to 6 of the serial i/o status register are initialized to ?0? at reset, but if the transmit enable bit of the serial i/o control register has been set to ?1?, the transmit shift completion flag (bit 2) and the transmit buffer empty flag (bit 0) become ?1?. [serial i/o control register (siocon)] 001a 16 the serial i/o control register c onsists of eight control bits for the serial i/o function. [uart control register (uartcon)] 001b 16 the uart control register consists of four control bits (bits 0 to 3) which are valid when asynchro nous serial i/o is selected and set the data format of an data tr ansfer and one bit (bit 4) which is always valid and sets the output structure of the p0 5 /txd pin. [baud rate gene rator (brg)] 001c 16 the baud rate generator determin es the baud rate for serial transfer. the baud rate generator divides the frequency of the count source by 1/(n + 1), where n is the value written to the baud rate generator. ?notes on serial i/o ? serial i/o interrupt when setting the transmit enable bit to ?1?, the serial i/o transmit interrupt request bit is automatically set to ?1?. when not requiring the interrupt occu rrence synchronized with the transmission enabled, ta ke the following sequence. 1. set the serial i/o transmit interrupt enable bit to ?0? (dis- abled). 2. set the transmit enable bit to ?1?. 3. set the serial i/o transmit interrupt request bit to ?0? after 1 or more instructions have been executed. 4. set the serial i/o transmit interrupt enable bit to ?1? (enabled). ? i/o pin function when serial i/o is enabled. the functions of p0 6 and p0 7 are switched with the setting values of a serial i/o mode selection bit and a serial i/o synchronous clock selection bit as follows. (1) serial i/o mode selection bit ?1? : clock synchronous type se rial i/o is selected. setup of a serial i/o sync hronous clock selection bit ?0? : p0 6 pin turns into an output pin of a synchronous clock. ?1? : p0 6 pin turns into an input pin of a synchronous clock. setup of a s rdy output enable bit (srdy) ?0? : p0 7 pin can be used as a normal i/o pin. ?1? : p0 7 pin turns into a s rdy output pin. (2) serial i/o mode selection bit ?0? : clock asynchronous (uart) ty pe serial i/o is selected. setup of a serial i/o sync hronous clock selection bit ?0? : p0 6 pin can be used as a normal i/o pin. ?1? : p0 6 pin turns into an input pin of an external clock. when clock asynchronous (uart) type serial i/o is selected, it is p0 7 pin. it can be used as a normal i/o pin.
rev.2.00 mar 05, 2007 page 36 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 46. structure of serial i/o1-related registers b7 transmit buffer empty flag (tbe) 0: buffer full 1: buffer empty receive buffer full flag (rbf) 0: buffer empty 1: buffer full transmit shift completion flag (tsc) 0: transmit shift inprogress 1: transmit shift completed overrun error flag (oe) 0: no error 1: overrun error parity error flag (pe) 0: no error 1: parity error framing error flag (fe) 0: no error 1: framing error summing error flag (se) 0: (oe) u (pe) u (fe)=0 1: (oe) u (pe) u (fe)=1 not used (returns ?1? when read) uart control register (uartcon: address 001b 16 , initial value: e0 16 ) character length selection bit (chas) 0: 8 bits 1: 7 bits parity enable bit (pare) 0: parity checking disabled 1: parity checking enabled parity selection bit (pars) 0: even parity 1: odd parity stop bit length selection bit (stps) 0: 1 stop bit 1: 2 stop bits p0 5 /t x d p-channel output disable bit (poff) 0: cmos output (in output mode) 1: n-channel open drain output (in output mode) not used (return ?1? when read) brg count source selection bit (css) 0: source 1: source/4 serial i/o synchronous clock selection bit (scs) 0: brg output divided by 4 when clock synchronous serial i/o is selected, brg output divided by 16 when uart is selected. 1: external clock input when clock synchronous serial i/o is selected, external clock input divided by 16 when uart is selected. s rdy output enable bit (srdy) 0: p0 7 pin operates as ordinary i/o pin 1: p0 7 pin operates as s rdy output pin transmit interrupt source selection bit (tic) 0: interrupt when transmit buffer has emptied 1: interrupt when transmit shift operation is completed transmit enable bit (te) 0: transmit disabled 1: transmit enabled receive enable bit (re) 0: receive disabled 1: receive enabled serial i/o mode selection bit (siom) 0: clock asynchronous (uart) serial i/o 1: clock synchronous serial i/o serial i/o enable bit (sioe) 0: serial i/o disabled (pins p0 4 to p0 7 operate as ordinary i/o pins) 1: serial i/o enabled (pins p0 4 to p0 7 operate as serial i/o pins) serial i/o control register (siocon: address 001a 16 , initial value: 00 16 ) serial i/o status register (siosts: address 0019 16 , initial value: 80 16 ) b0 b7 b0 b7 b0
rev.2.00 mar 05, 2007 page 37 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. a/d converter the functional blocks of the a/ d converter are described below. [ad conversion register] ad the a/d conversion register is a re ad-only register that stores the result of a/d conversion. do not read out this register during an a/d conversion. [ad control register] adcon the ad control register co ntrols the a/d converter. bit 2 to 0 are analog input pin selection bits. bit 3 is the ad conversion clock se lection bit. when ?0? is set to this bit, the a/d conversion clock is source/2 and the a/d conversion time is 122 cycles of source. when ?1? is set to this bit, the a/d conversion clock is source and the a/d conversion time is 61 cycles of source. bit 4 is the ad conversion completi on bit. the value of this bit remains at ?0? during a/d conv ersion, and changes to ?1? at completion of a/d conversion. a/d conversion is started by setting this bit to ?0?. [comparison voltage generator] the comparison voltage generato r divides the voltage between v ss and v cc by 1024, and outputs the divided voltages. [channel selector] the channel selector se lects one of ports p1 7 /an 7 to p1 0 /an 0, and inputs the voltage to the comparator. [comparator and control circuit] the comparator and control circ uit compares an analog input voltage with the comparison voltage and stores its result into the ad conversion register. when a/ d conversion is completed, the control circuit sets the ad co nversion completion bit and the a/ d interrupt request bit to ?1 ?. because the comparator is constructed linked to a capacitor, set source in order that the a/d conversion clock is 250 kh z or over during a/d conversion. ? notes on a/d converter as for ad translation accuracy , on the following operating conditions, accuracy may become low. (1) when v cc voltage is lower than [ 3.0 v ], the accuracy at the low temperature may become extremely low compared with that at room temperature. when the system would be used at low temperature, the use at v cc = 3.0 v or more is recommended. (2) when x cin or the low-speed on-chip oscillator is selected as source, the a/d convert er cannot be used. fig 47. structure of ad control register fig 48. structure of ad conversion register ad control register (adcon: address 0034 16 , initial value: 10 16 ) analog input pin selection bits 000: p1 0 /an 0 001: p1 1 /an 1 010: p1 2 /an 2 011: p1 3 /an 3 100: p1 4 /an 4 101: p1 5 /an 5 110: p1 6 /an 6 111: p1 7 /an 7 ad conversion clock selection bit 0: source/2 1: source ad conversion completion bit 0: conversion in progress 1: conversion completed not used (returns ?0? when read) b7 b0 read 8-bit (read only address 0035 16 ) (address 0035 16 ) read 10-bit (read in order address 0036 16 , 0035 16 ) (address 0036 16 ) (address 0035 16 ) note: high-order 6-bit of address 0036 16 returns ?0? when read. b7 b0 b9 b8 b7 b7 b0 b6 b5 b4 b3 b2 b1 b0 b9 b7 b0 b8 b7 b6 b5 b4 b3 b2
rev.2.00 mar 05, 2007 page 38 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 49. block diagram of a/d converter c h a n n e l s e l e c t o r a/d control circuit ad conversion register (low-order) resistor ladder v cc v ss comparator a/d interrupt request 10 p1 0 /an 0 p1 1 /an 1 p1 2 /an 2 p1 3 /an 3 p1 4 /an 4 p1 5 /an 5 p1 6 /an 6 p1 7 /an 7 b7 b0 3 data bus ad control register (address 0034 16 ) ad conversion register (high-order) (address 0036 16 ) (address 0035 16 ) source source/2
rev.2.00 mar 05, 2007 page 39 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. watchdog timer the watchdog timer gives a means for returning to a reset status when the program fails to run on its normal loop due to a runaway. the watchdog timer consists of an 8-bit watchdog timer h and an 8-bit watchdog timer l, being a 16- bit counter. the operation of the watchdog timer is controlled by bits 2 to ?0? in function set rom data 2 and the watch dog timer control register. ? watchdog timer disable bit when the watchdog timer disable bit (bit 1 in function set rom data 2(fsrom2)) is set to ?0?, the watchdog timer is enabled and starts counting after reset. setting this bit to ?1? does not operate the watchdog timer. this bit cannot be rewritten by executing the instruction. to use the watchdog timer, alwa ys set this bit to ?0?. after reset, the watc hdog timer cannot start counting by a program. ? watchdog timer source clock selection bit the count source of the watchdog timer is selected by the watchdog timer source clock se lection bit (bit 0 in fsrom2). this bit cannot be rewritten by executing the instruction. when this bit is set to ?0?, the count source is always set to the low-speed on-chip os cillator output/16. when this bit is set to ?1?, the count source is set to source/ 16. source is changed by setting th e clock selection bits (bits 5 and 4 in the clock mode register (clkm: address 0037 16 )). ? watchdog timer h count source selection bit the count source of watchdog timer h is selected by the watchdog timer control regist er (wdtcon: address 0039 16 ). when the watchdog timer h count source selection bit (bit 7 in wdtcon) is set to ?0?, the count source is set to an underflow signal from watch dog timer l. when this bit is set to ?1?, the clock selected as the count source of watchdog timer l is input to watchdog timer h. the initial value of this bit after releasing reset can be set by the bit 2 in fsrom2. ? watchdog timer operation resetting or writing any data to wdtcon sets watchdog timer h to ?ff 16 ? and watchdog timer l to ?ff 16 ?. when the watchdog timer starts, the selected clock is counted and internal reset occurs by the watchdog timer h underflow. writing to wdtcon is usually programmed to be performed before underflow. reading wdtcon reads the values of the high-order 6 bits in the watchdog timer h counter and the watch dog timer count source selection bit. the following shows the time to watchdog timer underflow after writing to the watchdog ti mer control register. the example applies when the x in input clock is selected as source and f(x in ) = 8 mhz. ? watchdog timer h count source selection bit = 0: 131.072 ms ? watchdog timer h count sour ce selection bit = 1: 512 s fig 50. structure of function set rom data 2 fig 51. structure of watchdog timer control register fig 52. block diagram of watchdog timer watchdog timer source clock selection bit 0 : low-speed on-chip oscillator/16 1 : system clock/16 watchdog timer start selection bit 0 : start watchdog timer 1 : stop watchdog timer watchdog timer h count source initial value selection bit 0 : initial value of bit 7 of wdtcon after reset release is ?0? 1 : initial value of bit 7 of wdtcon after reset release is ?1? stp instruction function selection bit 0 : system enters into the stop mode at the stp instruction execution 1 : internal reset occurs at the stp instruction execution low-speed on-chip oscillator control bit (note 1) 0 : stop of low-speed on-chip oscillator disabled 1 : stop of low-speed on-chip oscillator enabled set ?0? to these bits certainly. b7 function set rom data 2 fsrom2 (ffda 16 ) b0 note 1: if ?0? is set to this bit, it is not possible to write ?1? to bit 0 in the clock mode register. also, the low-speed on-chip oscillator does not stop even if the stp instruction is executed. watchdog timer h (read only for high-order 6-bit) not used (returns ?0? when read) watchdog timer h count source selection bit 0 : watchdog timer l underflow 1 : low-speed on-chip oscillator/16 or source/16 watchdog timer control register (note) (wdtcon: address 0039 16 , initial value: x0111111 2 ) b7 b0 note: the initial value of this register is changes by setting of function set rom data 2. watchdog timer h (8) data bus watchdog timer l (8) ?ff 16 ? is set at wdtcon writing 1/16 source low-speed on-chip oscillator watchdog timer source clock selection bit (bit 0 of fsrom2) watchdog timer start selection bit (bit 1 of fsrom2) reset circuit internal reset stp instruction function selection bit (bit 3 of fsrom2) stp instruction reset pin input watchdog timer h count source selection bit (bit 7 of wdtcon) watchdog timer h count source initial value selection bit (bit 2 of fsrom2) fsrom2: function set rom data 2 wdtcon: watchdog timer control register cpum: cpu mode register ?ff 16 ? is set at wdtcon writing initial value setting after releasing reset
rev.2.00 mar 05, 2007 page 40 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. ? notes on watchdog timer (1) the watchdog time r operates in wait mode. to prevent underflow, write to the watchdog timer control register. the watchdog timer stops in st op mode, but starts counting at the same time as exiting stop mode. after exiting stop mode, it continues counting dur ing oscillati on stabilization time. to prevent underflow dur ing the period, the watchdog timer h count source selection bit (bit 7) in the watchdog timer control register (address 0039 16 ) should be set to ?0? before executing th e stp instruction. note that the watchdog timer c ontinues counting even if the stp instruction is executed in the following two conditions: 1 stopping the low-speed on-chip oscillator: disabled (bit 4 in fsrom2) source clock of the watchd og timer: low-speed on-chip oscillator/16 (bit 0 in fsrom2) 2 stopping the low-speed on-chip oscillator: disabled (bit 4 in fsrom2) source clock of the watchdog timer: source (bit 0 in fsrom2) source: low-speed on-chip oscillator (bits 5 and 4 in clkm) (2) stp instruction fu nction selection bit the function of the stp instruction can be selected by the bit 2 in fsrom2. this bit cannot be used for rewriting by executing the stp instruction. ? when this bit is set to ?0?, stop mode is entered by executing the stp instruction. ? when this bit is set to ?1?, internal reset occurs by executing the stp instruction.
rev.2.00 mar 05, 2007 page 41 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. power-on reset circuit reset can be automatically performed at power on (power-on reset) by the built-in power-on reset circuit. to use the built-in power-on re set circuit, leave the reset pin open (the pull-up resistor is built-in). low voltage detection circuit the built-in low voltage detection circuit is design ed to detect a drop in voltage and to reset the microcomputer if the power source voltage drops belo w a set value (typ.1.95 v). the low voltage detection circuit is valid by setting ?1? to bit 0 of the function set rom data 0. also, when ?1? is set to bit 2 of the function set rom data 1, the low voltage detection circuit can be valid even in the stop mode. the low voltage detection circuit is stopped in the stop mode by setting ?0? to this bit, so that the power dissip ation is reduced. fig 53. operation waveform diagram of power-on reset circuit fig 54. operation waveform diagram of low voltage detection circuit fig 55. timing diagram at reset v cc ( note ) power-on reset circuit output internal reset signal note: keep the value of supply voltage to the minimum value or more of the recommended operating conditions. reset released reset state power-on v cc internal reset signal reset voltage (typ:1.95v) microcomputer starts operation by the built-in on-chip oscillator. ? ? fffc fffd adh,adl ? ? adl adh reset address from the vector table low-speed on-chip oscillator clock internal cpu clock ? ? ? ? ? ? ? reset internal reset signal sync address data 9 to 16 cycles of internal cpu clock
rev.2.00 mar 05, 2007 page 42 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 56. timing diagram at reset notes 1: x : undefined 2: the content of other registers is undefined when the microcomputer is reset. the initial values must be surely set before you use it. 3: do not access to the sfr area including nothing. 4: when the setting by the function set rom data 2 (fsrom2) is performed, the initial values of this bit at reset are changed. 0010 16 0011 16 0012 16 0013 16 0014 16 0015 16 port p0 pull-up control register (pull0) port p1 pull-up control register (pull1) 0019 16 serial i/o status register (siosts) 001a 16 serial i/o control register (siocon) 001b 16 uart control register (uartcon) 0030 16 0031 16 0032 16 0034 16 ad control register (adcon) 0037 16 0038 16 oscillation stop detection register (clkstp) 0039 16 watchdog timer control register (wdtcon) 003a 16 interrupt edge selection register (intedge) 003b 16 cpu mode register (cpum) 003c 16 interrupt request register 1 (ireq1) 003d 16 interrupt request register 2 (ireq2) 003e 16 interrupt control register 1 (icon1) 003f 16 interrupt control register 2 (icon2) clock mode register (clkm) port p0 drive capacity control register (dccr) 0001 16 port p0 direction register (p0d) 0003 16 0005 16 0007 16 000c 16 000d 16 000e 16 000f 16 timer a (low-order) (tal) timer a (high-order) (tah) 0028 16 prescaler 12 (pre12) 0029 16 timer 1 (t1) 002a 16 002b 16 002c 16 002d 16 002e 16 timer count source set register (tcss) 002f 16 port p1 direction register (p1d) port p2 direction register (p2d) port p3 direction register (p3d) capture/compare register (low-order) (cral) key-on wakeup input selection register (keys) capture/compare register (high-order) (crah) capture/compare register r/w pointer (ccrp) compare output mode register (cmom) compare register re-load register (cmpr) capture/compare port register (ccpr) capture/compare status register (ccsr) capture software trigger register (cstr) compare interrupt source set register (cisr) capture mode register (capm) timer mode register (tm) timer 2 (t2) (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33) (34) (35) (36) (37) (38) 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 not e 4 0 00 16 00 16 ff 16 ff 16 ff 16 ff 16 1 1 1 1 1 1 0 0 0 0 0 0 0 1 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16 00 16
rev.2.00 mar 05, 2007 page 43 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. clock circuit the clock circuit includes the x in clock (ceramic oscillator or crystal oscillator can be used), x cin clock (32 khz oscillator can be used), external clock input, high-speed on-chip oscillator, and low-speed on-chi p oscillator. pins p2 0 /x out /x cout and p2 1 /x in /x cin can be shared for the ports, x in oscillation, and x cin oscillation. use the oscillation method select ion bits (bits 1 and bit 0 in function set rom data 1 (fsrom1) ) to set the function of these pins. ? ceramic resonator or crystal oscillator set the oscillation method sel ection bits (bits 1 and bit 0 in fsrom1) to ?01 2 ?, and connect the resonator (or the oscillator) and external circuit with the shortest wiring length possible. the constants of the oscillator circuit differ depending on the resonator. use the values recommended by the resonator manufacturer. (an external feedb ack resistor may be necessary under some conditions.) setting the x in /x cin oscillation control bit to ?0? starts oscillation. this bit is sets to ?0? after reset. ? 32 khz crystal oscillator set the oscillati on method selection bits to ?10 2 ?, and connect the 32 khz crystal oscillator and external circuit with the shortest wiring length possible. the constants of the oscillator circuit differ depending on the resonator. use the values recommended by the resonator manufacturer. (an external feedb ack resistor may be necessary under some conditions.) setting the x in /x cin oscillation control bit to ?0? starts oscillation. this bit is sets to ?0? after reset. ? external clock input set the oscillation method selection bits to ?11 2 ?, and connect the clock source to the p2 0 /x out pin. in this case, the p2 1 /x in pin can be used as an i/o port. ? high-speed on-chip oscillator the high-speed on-chi p oscillator is st opped after reset. setting the high-speed on-chip os cillator oscillation control bit (bit 1 in clkm) to ?0? starts osci llation. this bit is sets to ?1? after reset. ? low-speed on-chip oscillator the low-speed on-chip oscillator au tomatically starts oscillating after reset. setting the low-speed on-chip osc illator oscillation control bit (bit 0 in clkm) to ?1? stops oscillation. this bit is sets to ?0? after reset. if the low-speed on-chip oscillator control bit (bit 4 in fsrom2) is set to ?0? and stopping the low-speed on-chip oscillator is disabled, the low-sp eed on-chip oscill ator oscillation control bit cannot be set to ?1? and oscillation ca nnot be stopped. also, the oscillator does not stop even when the stp instruction is executed. ? using no oscillator pins (p2 0 as output port and p2 1 as i/o port) to use only an internal on-chi p oscillator, set the oscillation method selection bits to ?00 2 ?. the p2 0 /x out pin can be used as an output port and the p2 1 /x in pin can be used as an i/o port. fig 57. structure of function set rom data 1 fig 58. external circuit of ceramic resonator fig 59. external circuit of 32 khz quarts-crystal oscillator fig 60. external clock input circuit oscillation method selection bits (note 1) b1 b0 0 0: clock pins not used (p2 0 /x out and p2 1 /x in are used as i/o ports) 0 1: ceramic resonator or quarts-crystal oscillator 1 0: 32 khz quarts-crystal oscillator 1 1: external clock input (p2 1 /x in pin is used as i/o port) low voltage detection circuit valid bit in the stop mode (note 2) 0: low voltage detection circuit invalid in the stop mode 1: low voltage detection circuit valid in the stop mode set ?0? to these bits certainly. set ?1? to this bit certainly. b7 function set rom data 1 fsrom1 (ffd9 16 ) b0 notes 1: the p2 0 /x out and p2 1 /x in pins build in an on-chip oscillator. even if these pins are used as i/o ports, the oscillator circuit is enabled when the mcu?s vcc voltage drops below the operation limit voltage. in this case these pins may output undefined values. 2: when the low voltage detection circuit is set to be valid in the stop mode, the dissipation current in the stop mode is increased. m37549 x in x out rd c out c in insert a damping resistor if required. the resistance will vary depending on the oscillator and the oscillation drive capacity setting. use the value recommended by the maker of the oscillator. also, if the oscillator manufacturer?s data sheet specifies that a feedback resistor be added external to the chip though a feedback resistor exists on- chip, insert a feedback resistor between x in and x out following the instruction. m37549 x cin x cout rd c out c in insert a damping resistor if required. the resistance will vary depending on the oscillator and the oscillation drive capacity setting. use the value recommended by the maker of the oscillator. also, if the oscillator manufacturer?s data sheet specifies that a feedback resistor be added external to the chip though a feedback resistor exists on-chip, insert a feedback resistor between x in and x out following the instruction. m37549 p2 1 x out i/o port external oscillation circuit vcc vss connect the external clock to the p2 0 /x out pin, not the p2 1 /x in pin.
rev.2.00 mar 05, 2007 page 44 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 61. structure of clock mode register ? note on clock circuit ? switching to x in /x cin oscillator after a reset is cleared, operatio n starts using the low-speed on- chip oscillator. when switching to x in /x cin oscillator, make sure to set a sufficient wait duration with the on-chip oscillator to allow the x in /x cin oscillator to stabilize. low-speed on-chip oscillator oscillation control bit (notes 1, 2, and 4) 0: oscillation start 1: oscillation stop high-speed on-chip oscillator oscillation control bit (notes 2 and 4) 0: oscillation start 1: oscillation stop x in oscillation control bit (notes 2 and 4) 0: oscillation start 1: oscillation stop oscillation stabilization time set bit after release of the stp instruction 0: timer 1 set to ?01 16 ? and prescaler 12 to ?ff 16 ? automatically 1: un-automatically clock selection bits (notes 3 and 4) b5 b4 0 0 : low-speed on-chip oscillator 0 1 : high-speed on-chip oscillator 1 0 : x in /x cin oscillation, external clock 1 1 : not available clock division ratio selection bit b7 b6 0 0 : source/8 (low-speed mode) 0 1 : source/4 (middle-speed mode) 1 0 : source/2 (high-speed mode) 1 1 : no division (double-speed mode) b7 clock mode register (clkm: address 0037 16 , initial value: 02 16 ) b0 notes 1: when stopping the low-speed on-chip oscillat or is disabled by setting the low-speed on-chip oscillator control bit (bit 4 in fs rom2), ?1? cannot be written to this bit. the low-speed on-chip oscillator does not stop even in stop mode. 2: ?1? cannot be written to the oscillation contro l bits (bits 2 to 0) of the clock selected as source by the clock selection bits. 3: when ?oscillation pins not used? is set by the oscillation method se lection bits (bits 1 and 0 in fsrom1), ?10 2 ? cannot be written to these bits. 4: do not change the values of the clock selection bits and the clock oscillation control bits at the same time using a single instru ction. always use different instructions to rewrite these values.
rev.2.00 mar 05, 2007 page 45 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. oscillation control ? clock mode register clock mode register contains th e oscillation control bits of each oscillation circuits, cloc k selection bits and etc ? clock selection bits source can be selected by the cl ock selection bits (bits 5 and 4 in clock mode register). source can be selected from low- speed on-chip oscillator, high- speed on-chip oscillator, x in /x cin oscillaton or external clock in put by the clock selection bits. source is also used to the clock for peripheral functions. when the oscillation method selection bits (bits 1 and 0 in fsrom1) is set to ?00 2 ? (oscillation pins not used), setting the clock selection bits to ?10 2 ? (x in /x cin oscillation, external clock input) is disabled. ? clock division ratio selection bit the internal clock is generated by dividing source. select the division ratio using the clock division ration selection bits (bits 7 and 6 in clkm). the division ratio can be selected from among source/8 (low-speed mode), /4 (middle-speed mode), /2 (high-speed mode), and no division (double-speed mode). table 9 shows the divisi on ratio (mode) settings. when releasing reset, the low-spee d on-chip oscillator is selected as source, and source/8 is selected as the internal clock. the high-speed on-chip oscillator is stopped at this time. if an oscillation circuit is connected to the clock pin, oscillation starts. to switch source to x in /x cin oscillation, generate wait time using the on-chip oscillator until the oscillation is stabilized. ? : can be ?0? or ?1?, no change in outcome table 9 setting the clock division (mode) source clkm fsrom1 fsrom2 clock division ratio selection bits clock selection bits x in /xc in oscillation control bit high-speed on-chip oscillator oscillation control bit low-speed on-chip oscillator oscillation control bit oscillation method selection bits low-speed on- chip oscillator control bit bit 7, 6 bit 5, 4 bit 2 bit 1 bit 0 bit 1, 0 bit 4 x in double-speed 11 10 0 ?? 01 ? high-speed 10 10 0 ?? 01 ? middle-speed 01 10 0 ?? 01 ? low-speed 00 10 0 ?? 01 ? x cin double-speed 11 10 0 ?? 10 ? high-speed 10 10 0 ?? 10 ? middle-speed 01 10 0 ?? 10 ? low-speed 00 10 0 ?? 10 ? external clock double-speed 11 10 ?? ? 11 ? high-speed 10 10 ?? ? 11 ? middle-speed 01 10 ?? ? 11 ? low-speed 00 10 ?? ? 11 ? high-speed on-chip oscillator double-speed 11 01 ? 0 ??? high-speed 10 01 ? 0 ??? middle-speed 01 01 ? 0 ??? low-speed 00 01 ? 0 ??? low-speed on-chip oscillator double-speed 11 00 ?? 0 ? 1/0 high-speed 10 00 ?? 0 ? 1/0 middle-speed 01 00 ?? 0 ? 1/0 low-speed 00 00 ?? 0 ? 1/0 bit mode
rev.2.00 mar 05, 2007 page 46 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. ? stop mode when the stp instruction is executed, the internal clock stops at an ?h? level and the x in /x cin and on-chip oscillator stops. at this time, timer 1 is set to ?01 16 ? and prescaler 12 is set to ?ff 16 ? when the oscillation stabilization time set bit after release of the stp instruction is ?0?. on the other hand, timer 1 and prescaler 12 are not set when the above bit is ?1?. accordingly, set the wait time fit for the oscillation stabilization time of the oscillator to be used. when an external interr upt is accepted, oscillation is restarted but the internal clock remains at ?h? until timer 1 underflows. as soon as timer 1 underflows, the internal clock is supplied. this is because when a ceramic resonator is used, some time is required until a start of oscillation. in case oscillation is restarted by reset, no wait time is generated. so apply an ?l? level to the reset pin while oscillation becomes stable, or set the wait time by on-chip oscillator operation after system is released from reset until the oscillation is stabled. ?wait mode if the wit instruction is executed, the internal clock stops at an ?h? level, but the oscillator does not stop. the internal clock restarts if a reset occurs or when an interrupt is received. since the oscillator does not stop, normal operati on can be started immediately after the clock is restarted. to ensure that interrupts will be received to release the stp or wit state, interrupt enable bits must be set to ?1? before the stp or wit instruction is executed. ? note on oscillation control for use with the oscillation stabilization set bit after release of the stp instruction set to ?1?, set values in timer 1 and prescaler 12 after fully appreciating the oscillation stabilization time of the oscillator to be used.
rev.2.00 mar 05, 2007 page 47 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 62. block diagram of internal clock generating circuit ?00?: low-speed mode high-speed on-chip oscillator (hsoco) 1/4 1/2 timing (internal clock) source ?10?: high-speed mode clock division ratio selection bits wit instruction low-speed on-chip oscillator (lsoco) 1/8 ?01?: middle-speed mode ?11?: double-speed mode peripheral function clock generation circuit (1/1 to 1/256) clock selection bits high-speed on-chip oscillator oscillation control bit low-speed on-chip oscillator oscillation control bit 1/16 prescaler 12 timer 1 oscillation stabilization time set timer after release of the stp instruction sq r reset interrupt disable flag i interrupt request x in /x cin oscillation control bit bits 0 and 1 of fsrom1: setting of the oscillation method setection bits ?00?: clock pins not used p2 1 /x in /x cin port p2 1 control circuit p2 0 /x out /x cout port p2 0 control circuit ?10? ?01? ?00? it is not possible to write ?1? to the low-speed on-chip oscillator oscillation control bit if low-speed on-chip oscillator stop has been disabled by bit 4 in fsrom2. also, the low-speed on-chip oscillator does not stop even if the stp instruction is executed. x in oscillation cannot be selected as source if clock pins not used is selected. p2 1 /x in /x cin port p2 1 control circuit p2 0 /x out /x cout ?11?: external clock input noise filter p2 1 /x in /x cin p2 0 /x out /x cout rf ?10?: 32 khz quartz- crystal oscillation p2 1 /x in /x cin p2 0 /x out /x cout rf ?01?: ceramic or quartz- crystal oscillation 1/1 to 1/256 peripheral function (note 2) (note 2) reset sq r qs stp instruction stp instruction r notes 1: the oscillation circuit is built in the p2 0 /x out /x cout pin and the p2 1 /x in /x cin pin. when the vcc of the microcomputer is lower than the operation lower bound voltage even if these pi ns are used as i/o ports, the oscillation circuit is connected and undefined values may be output from these pins. 2: although a feed-back resistor exists on-chip, an externa l feed-back resistor may be needed depending on conditions.
rev.2.00 mar 05, 2007 page 48 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 63. source state transition ? x in hsoco ?s? lsoco ?s? xx10x011 x in ?o? hsoco ?o? ? lsoco xx00x000 x in ?s? hsoco ?s? ? lsoco xx00x110 x in ?s? ? hsoco lsoco ?s? xx01x101 ? x in hsoco ?o? lsoco ?s? xx10x001 x in ?o? hsoco ?s? ? lsoco xx00x010 x in ?s? hsoco ?o? ? lsoco xx00x100 ? x in hsoco ?o? lsoco ?o? xx10x000 x in ?o? ? hsoco lsoco ?o? xx01x000 ? x in hsoco ?s? lsoco ?o? xx10x010 x in ?s? ? hsoco lsoco ?o? xx01x100 x in ?o? ? hsoco lsoco ?s? xx01x001 high-speed on-chip oscillator (hsoco): oscillation start b1=0 x in oscillation: oscillation start (note 3) b2=0 low-speed on-chip oscillator (lsoco): oscillation start b0=0 source selection hsoco (b5,4=0,1) x in (b5,4=1,0) (note 3) x in stop (b2=1) oscillation (b2=0) hsoco oscillation (b1=0) stop (b1=1) source selection hsoco (b5,4=0,1) lsoco (b5,4=0,0) lsoco stop (b0=1) oscillation (b0=0) hsoco oscillation (b1=0) stop (b1=1) source selection x in (b5,4=1,0) (note 3) lsoco (b5,4=0,0) lsoco stop (b0=1) oscillation (b0=0) x in oscillation (b2=0) stop (b2=1) b2 b1 b5,4 (note 3) b5,4 b5,4 (note 3) b1,0 b1 b0 (note 1) b0 (note 1) b1 b1 b2 b0 (note 1) b5,4 (note 3) b2,0 (note 1) b2 b5,4 b2,1 (note 1) b0 (note 1) b2,0 (note 1) b1,0 (note 1) b2,1 [remarks] reset released b2 state transition of clock mode register clkm (address: 0037 16 ) setting value and clock (when x in oscillation is used. the same applies when x cin oscillation and external clock input are used.) x in ?o? hsoco ?s? ? lsoco xx00x010 b5,4 (note 3) (note 2) x in , hsoco, lsoco, and respective oscillation and stop status in each mode are shown. the symbol ( ? ) indicates source (oscillation) selected by the clock selection bits. ?o? indicates oscillation and ?s? indicates stopping. the values such as ?xx00x010? indicate the values (binary) of the clock mode register in the mode. the arrow (bx) indicates a bit in the clock mode register, showing a transition by changing the bit values. entering the mode should be performed according to the arrows. wait mode and stop mode can be entered from all modes, and the original mode is returned after exiting. notes 1: when stopping the low-speed on-chip oscillator is disabled by the low-speed on-chip oscillator control bit (bit 4 in f srom2), ?1? cannot be written to the bit 0 in clkm. the low-speed on-chip oscillator does not stop even in stop mode. 2: after releasing reset, the low-speed on-chip oscillator is selected as source and divided by 8 is selected as the cpu clock. 3: when the oscillation pins not used is set by the oscillation method selection bits (bits 1 and 0 in fsrom1), ?10? cannot be written to bits 5 and 5 in clkm. to use x in oscillation as source, switch after x in oscillation is stabilized. supply a stable clock when an external clock is used. 4: do not change the values of the clock selection bits (bits 5 and 4) in clkm and the individual clock oscillation control bi ts (bits 2 to 0) at the same time using a singe instruction. always use different instructions to rewrite these values. 5: wait until the oscillation used in the destination mode is stabilized before entering. wait mode ? low-speed on-chip oscillator: status before executing wit instruction is kept ? high-speed on-chip oscillator: status before executing wit instruction is kept ? x in oscillation: status before executing the wit instruction is kept stop mode ? low-speed on-chip oscillator: stopped (note 1) ? high-speed on-chip oscillator: stopped ? x in oscillation: stopped b5,4 (note 3)
rev.2.00 mar 05, 2007 page 49 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. ? oscillation stop detection circuit the oscillation stop detection circ uit is used for reset occurrence when a ceramic resonator or rc oscillation ci rcuit stops by disconnection. to use this circuit, set an on-chip oscillator to be in active. the oscillation stop detection circuit is in active to set ?1? to the x in oscillation stop detection function active bit. when the oscillation stop detection circuit is enabled, the operation status of the x in oscillator circuit is monitored using the low-speed on-chip oscillato r, and if oscillation stop is detected the oscillation stop detection status bit is set to 1. if additionally the oscillation stop detection reset enable bit is set to ?1?, an internal reset is trig gered when the oscillator stops operating. the oscillation stop detection status bit is not initialized by an oscillation stop detection reset an d retains its value of 1. since the oscillation stop detection status bit is initialized to ?0? by an external reset, it is possible to determine if a reset was due to oscillation stop detection by checking the oscillation stop detection status bit. the x in oscillation and external clock input are set as the clocks to detect the oscillation stop. refer to the electrical characteristics for the frequencies to detect the oscillation stop. ? notes on oscillation stop detection circuit (1) do not execute the transition to ?state 2'a? shown in figure 65 because in this ?state 2'a? , mcu is stopped without reset even when x in oscillation is stopped. (2) x in oscillation stop detection function active bit is not cleared by the oscillation stop detection reset. accordingly, the oscillation stop detection circ uit is in active when system is released from internal reset cause of oscillation stop detection. (3) oscillation stop detection status bit is initialized by the following operation. ? external reset, power-on reset, low vo ltage detection reset, watchdog timer reset, and reset by stp instruction function ? write ?0? data to the x in oscillation stop detection function active bit. (4) the oscillation stop detection circuit is not included in the emulator mcu ?m37549rlss?. fig 64. structure of oscillation stop detection register fig 65. state transition of oscillation stop detection circuit x in oscillation stop detection function active bit 0: detection function inactive 1: detection function active oscillation stop detection reset enable bit 0: oscillation stop detection reset disabled 1: oscillation stop detection reset enabled oscillation stop detection status bit 0: oscillation stop not detected 1: oscillation stop detected not used (?0? at reading) b7 oscillation stop detection register (clkstp: address 0038 16 , initial value: 00 16 ) b0 notes on switch of clock (1) executing the state transition after stabilizing x in oscillation. (2) mcu cannot be returned by on-chip oscillator and its operation is stopped since internal reset does not occur at oscillation stop detected in state 2'a. ac cordingly, do not execute the transition to state 2'a. (3) stp instruction cannot be used when oscilla tion stop detection circuit is in active. (4) the same applies when the high-speed on-chip oscillator is set as source. make sure that the low-speed on-chip oscillator should also oscillate. when a reset occurs, the high-speed on-chip oscillator stops. reset state 1 oscillation stop detection reset disabled when oscillation stop is detected; clkstp 2 is set to ?1?. internal reset does not occur. = 0 2 = 1 2 clkstp 0 = 0 2 (clkstp 2 is set to ?0?.) clkstp 0 = 1 2 (note 1) oscillation stop is detected (internal reset) reset state 2 external reset (reset=?l?) ? power-on reset ? low voltage detection reset ? watchdog timer reset ? reset by stp instruction function return from oscillation stop detection reset clkstp 2 is set to ?1?. so, return from oscillation stop reset can be confirmed. clkstp 1 = 0 2 clkstp 1 = 0 2 (clkstp 2 is set to ?0?.) clkm 54 = 10 2 clkm 54 = 00 2 (note 1) prohibitive state mcu stops when oscillation stops occurs. state 3'a state 2'b state 3'b state 3'c oscillation stop detection reset enabled when oscillation stop is detected; clkstp 2 is set to ?1?. internal reset occurs. oscillation stop detection reset enabled when oscillation stop is detected; clkstp 2 is set to ?1?. internal reset occurs. reset released clkm 54 = 10 2 clkm 54 = 00 2 (note 1) clkm 54 =10 2 clkm 54 =00 2 (note 1) state 3 x in oscillation : enabled low-speed on-chip oscillator : enabled state 3' x in oscillation : enabled low-speed on-chip oscillator : enabled x in : enabled high-speed on-chip oscillator : stop low-speed on-chip oscillator : enabled clkstp 1 clkstp 1 clkstp 1 = 1 2 state 2' clkstp 1 = 1 2 x in : enabled high-speed on-chip oscillator: stop low-speed on-chip oscillator : enabled reset released x in oscillation : enabled low-speed on-chip oscillator : enabled x in oscillation : enabled low-speed on-chip oscillator : enabled state 2 (note 2) (note 2) (note 2) source: x in source: low-speed on-chip oscillator (note 4) oscillation stop detection circuit is in active. (note 3) state 2'a ( note 2 ) oscillation stop detection reset disabled when oscillation stop is detected; clkstp 2 is set to "1". internal reset does not occur.
rev.2.00 mar 05, 2007 page 50 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. qzrom writing mode in the qzrom writing mode , the user rom area can be rewritten while the microcomputer is mounted on-board by using a serial programmer which is app licable for this microcomputer. table 10 lists the pin descript ion (qzrom writing mode) and figure 66 shows the pin connections. refer to figure 67 and figure 68 for examples of a connection with a serial programmer. contact the manufacturer of yo ur serial programmer for serial programmer. refer to the user's manual of you r serial programmer for details on how to use it. table 10 pin description (qzrom writing mode) fig 66. pin connection di agram (m37549g3/g2/g1fp) pin name i/o function v cc , v ss power source input apply 1.8 to 5.5 v to v cc , and 0 v to v ss . reset reset input input reset input pin. p2 1 /x in clock input input set the same termination as the single-chip mode. p2 0 /x out clock output output p0 0 ? p0 5 p1 1 ? p1 7 p3 0 , p3 1 i/o port i/o input ?h? or ?l? level signal or leave the pin open. cnv ss v pp input input qzrom programmable power source pin. p1 0 esda i/o i/o serial data i/o pin. p0 6 esclk input input serial clock input pin. p0 7 espgmb input input read/program pulse input pin. package type: prsp0024ga-a (24p2q-a) 12 11 10 9 8 13 7 14 6 15 5 16 4 17 3 18 2 19 1 20 21 22 23 24 m37549g3/g2/g1fp p3 0 p3 1 p1 3 /an 3 /key 3 /t2 out p1 2 /an 2 /key 2 /cmp 2 p1 1 /an 1 /key 1 /cmp 1 p1 0 /an 0 /key 0 /cmp 0 p0 7 (led 7 )/s rdy p0 6 (led 6 )/s clk reset p1 7 /an 7 /key 7 p1 5 /an 5 /key 5 p1 4 /an 4 /key 4 p2 0 /x out /x cout v ss v cc p1 6 /an 6 /key 6 p2 1 /x in /x cin cnv ss p0 0 (led 0 )/int 0 p0 1 (led 1 )/int 1 p0 5 (led 5 )/txd p0 4 (led 4 )/rxd p0 3 (led 3 )/cap 0 p0 2 (led 2 ) ? : set the same termination as the single-chip mode. : qzrom pin esda espgmb esclk reset gnd v cc v pp ?
rev.2.00 mar 05, 2007 page 51 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 67. when using e8 programmer, connection example 7549 group reset circuit set the same termination as the single-chip mode. vcc p1 0 (esda) reset vss p2 1 /x in p2 0 /x out 4.7 k ? * 1: open-collector buffer note : for the programming circuit, the wiring capacity of each signal pin must not exceed 47 pf vcc 14 12 10 8 13 9 7 4 2 6 3 1 *1 cnv ss 4.7 k ? 11 p0 6 (esclk) p0 7 (espgmb) 5
rev.2.00 mar 05, 2007 page 52 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 68. when using programmer of suisei electronics system co., ltd, connection example 7549 group set the same termination as the single-chip mode. vcc p1 0 (esda) reset vss p2 1 /x in p2 0 /x out note: for the programming circuit, the wiring capacity of each signal pin must not exceed 47 pf. cnv ss t_vdd t_vpp t_rxd t_sclk t_pgm/oe/md reset circuit t_reset gnd 4.7 k ? 4.7 k ? t_txd t_busy n.c. p0 6 (esclk) p0 7 (espgmb)
rev.2.00 mar 05, 2007 page 53 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. notes on programming (1) processor status register the contents of the processor status register (ps) after reset are undefined except for the interrupt disable flag i which is ?1?. after reset, initialize flags whic h affect program execution. in particular, it is essential to initialize the t flag and the d flag because of their effe ct on calculations. (2) interrupts the contents of the interrupt request bit do not change even if the bbc or bbs instruction is executed immediately after they are changed by program because this instruction is executed for the previous contents. for executing the instruction for the changed contents, execute one instruc tion before executing the bbc or bbs instruction. (3) decimal calculations ? for calculations in decimal notation, set the decimal mode flag d to ?1?, then execute the adc instruction or sbc instruction. in this case, execute sec instruction, clc instruction or cld in-struction after executing one instruction before the adc instruction or sbc instruction. ? in the decimal mode, the values of the n (negative), v (overflow) and z (zero) flags are invalid. (4) ports the values of the port direction re gisters cannot be read. that is, it is impossible to use the lda instruction, memory operation instruction when the t flag is ?1?, addressing mode using direction register values as qua lifiers, and bit test instructions such as bbc and bbs. it is also impossible to use bit operation instructi ons such as clb and seb and read/modify/write inst ructions of direction registers for calculations such as ror. for setting direction registers, us e the ldm instruction, sta in- struction, etc. (5) a/d conversion do not execute the stp inst ruction during a/d conversion. (6) instruction execution timing the instruction execution time can be obtained by multiplying the frequency of the internal clock by the number of cycles mentioned in the machine-language instruction table. the frequency of the internal clock is the same as that of the source in double-speed mode, twice the source cycle in high-speed mode, 4 times the source cycle in middle-speed mode and 8 times the source cycle in low-speed mode. (7) cpu mode register the processor mode bits can be written only once after releasing reset. always set them to ?00 2 ?. after written, rewriting any data to these bits is disabled because they are locked. (emulator mcu is excluded.) also, the stack page bit (bit 2) is not locked. in order to prevent error-writing to the processor mode bits (at program runaway), write the cpu mode register at the start of the program that runs after releasing reset. (8) state transition do not stop the clock selected as the opera tion clock because of setting of bits 0 to 2. notes on hardware (1) handling of power source pin in order to avoid a latch-up occurrence, connect a capacitor suitable for high frequencies as bypass capacitor between power source pin (v cc pin) and gnd pin (v ss pin). a ceramic capacitor of 0.01 f to 0.1 f is recommended. connect a capacitor across the power source pin and gnd pin with the shortest possible wiring.
rev.2.00 mar 05, 2007 page 54 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. notes on use countermeasures against noise it is necessary not only design the system taking measures against the noise as follows but to evaluate before actual use. 1. shortest wiring length (1) package select the smallest possible package to make the total wiring length short. the wiring length depends on a microcomputer package. use of a small package, for example qfp and not dip, makes the total wiring length short to re duce influence of noise. fig 69. selection of packages (2) wiring for reset pin make the length of wiring whic h is connected to the reset pin as short as possible. especially , connect a capacitor across the reset pin and the v ss pin with the shortest possible wiring (within 20mm). the width of a pulse input into the reset pin is determined by the timing necessary conditions. if noise having a shorter pulse width than the standard is input to the reset pin, the reset is released before the internal state of the microcomputer is completely initialized. this may cause a program runaway. fig 70. wiring for the reset pin (3) wiring for cloc k input/output pins ? make the length of wiring which is connected to clock i/o pins as short as possible. ? make the length of wiring (within 20 mm) across the grounding lead of a capacito r which is connected to an oscillator and the v ss pin of a microcomputer as short as possible. ? separate the v ss pattern only for osc illation from other v ss patterns. if noise enters clock i/o pins, clock waveforms may be deformed. this may cause a program failure or program runaway. also, if a potential difference is caused by the noise between the v ss level of a microcomputer and the v ss level of an oscillator, the correct clock will not be input in the microcomputer. fig 71. wiring for clock i/o pins (4) wiring to cnv ss pin connect cnv ss pin to a gnd pattern at the shortest distance. the gnd pattern is required to be as close as possible to the gnd supplied to v ss . in order to improve the noise reduction, to connect a 5 k ? resistor serially to the cnv ss pin - gnd line may be valid. as well as the above-mentioned, in this case, connect to a gnd pattern at the shortest distance. the gnd pattern is required to be as close as possible to the gnd supplied to v ss . the cnv ss pin of the qzrom is the power source input pin for the built-in qzrom. when pr ogramming in the built-in qzrom, the impedance of the cnv ss pin is low to allow the electric current for writing flow into the qzrom. because of this, noise can enter easily. if noise enters the cnv ss pin, abnormal instruction codes or data are read from the built-in qzrom, which may caus e a program runaway. fig 72. wiring for the v pp pin of the qzprom dip sdip sop qfp reset reset circuit noise v ss v ss n.g. reset circuit v ss reset v ss o.k. noise x in x out v ss n.g. x in x out v ss o.k. cnv ss v ss about 5k ? the shortest the shortest (note) (note) note: this indicates pin.
rev.2.00 mar 05, 2007 page 55 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. 2. connection of bypass capacitor across v ss line and v cc line connect an approximately 0.1 f bypass capacitor across the v ss line and the v cc line as follows: ? connect a bypass capacitor across the v ss pin and the v cc pin at equal length. ? connect a bypass capacitor across the v ss pin and the v cc pin with the shortest possible wiring. ? use lines with a larger diamet er than other signal lines for v ss line and v cc line. ? connect the power source wi ring via a bypass capacitor to the v ss pin and the v cc pin. fig 73. bypass capacitor across the v ss line and the v cc line 3. wiring to analog input pins ? connect an approximately 100 ? to 1 k ? resistor to an analog signal line which is connected to an analog input pin in series. besides, connect the resistor to the micr ocomputer as close as possible. ? connect an approximately 1000 pf capacitor across the v ss pin and the analog input pi n. besides, connect the capacitor to the v ss pin as close as po ssible. also, connect the capacitor across the analog input pin and the v ss pin at equal length. signals which is input in an an alog input pin (such as an a/d converter/comparator input pin) are usually output signals from sensor. the sensor which detects a change of event is installed far from the printed circuit board with a microcomputer, the wiring to an analog input pin is longer necessarily. this long wiring functions as an antenna which feeds noise into the microcomputer, which causes no ise to an analog input pin. fig 74. analog signal line and a resistor and a capacitor ? the analog input pin is conn ected to the capacitor of a voltage comparator. accordingl y, sufficient accuracy may not be obtained by the charge/discharge current at the time of a/d conversion when the an alog signal source of high- impedance is connected to an analog input pin. in order to obtain the a/d conversion result stabilized more, please lower the impedance of an an alog signal source, or add the smoothing capacitor to an analog input pin. v ss v cc v ss v cc n.g. o.k. noise thermistor analog input pin (note) n.g. o.k. v ss note : the resistor is used for dividing resistance with a thermistor. microcomputer
rev.2.00 mar 05, 2007 page 56 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. 4. oscillator concerns take care to prevent an oscillator that generates clocks for a mi- crocomputer operation from bei ng affected by other signals. (1) keeping oscillator away from large current signal lines install a microcomputer (and especially an oscillator) as far as possible from signal lines where a current larger than the toler- ance of current value flows. in the system using a microcom puter, there are signal lines for controlling motors, leds, and ther mal heads or others. when a large current flows through those signal lines, strong noise occurs because of mutual inductance. (2) installing oscillator away from signal lines where potential levels change frequently install an oscillator and a conn ecting pattern of an oscillator away from signal lines where pote ntial levels change frequently. also, do not cross such signal lines over the clock lines or the signal lines which are sensitive to noise. signal lines where potenti al levels change fre quently (such as the cntr pin signal line) may affect other lines at signal rising edge or falling edge. if such lines cro ss over a clock line, clock wave- forms may be deformed, which causes a microcomputer failure or a program runaway. fig 75. wiring for a large current signal line/writing of signal lines where potential levels change frequently (3) oscillator protection using v ss pattern as for a two-sided printed circuit board, print a v ss pattern on the underside (soldering side) of the position (on the component side) where an oscillator is mounted. connect the v ss pattern to the microcomputer v ss pin with the shortest possible wiring. besides, separate this v ss pattern from other v ss patterns. fig 76. v ss pattern on the underside of an oscillator x in x out v ss m microcomputer mutual inductance large current gnd x in x out v ss cntr do not cross n.g. (1) keeping oscillator away from large current signal lines (2) installing oscillator away from signal lines where potential levels change frequently oscillator wiring pattern example an example of v ss patterns on the underside of a printed circuit board separate the v ss line for oscillation from other v ss lines x in x out v ss
rev.2.00 mar 05, 2007 page 57 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. 5. setup for i/o ports setup i/o ports using hardware and software as follows: ? connect a resistor of 100 ? or more to an i/o port in series. ? as for an input port, read data several times by a program for checking whether input levels are equal or not. ? as for an output port, since the output data may reverse because of noise, rewrite data to its port latch at fixed periods. ? rewrite data to direction registers and pull-up control registers at fixed periods. fig 77. setup for i/o ports 6. providing of watchdog timer function by software if a microcomputer runs away becau se of noise or others, it can be detected by a software wa tchdog timer and the microcomputer can be reset to normal operation. this is equal to or more effective than program runa way detection by a hardware watchdog timer. the following s hows an example of a watchdog timer provided by software. in the following example, to re set a microcomputer to normal op- eration, the main routine detects errors of the interrupt processing routine and the interrupt processi ng routine detects errors of the main routine. this example assumes that interr upt processing is repeated mul- tiple times in a single main routine processing. ? assigns a single byte of ram to a software watchdog timer (swdt) and writes the initial value n in the swdt once at each execution of the main routine. the initial value n should satisfy the following condition: n + 1 (counts of interrupt processing executed in each main routine) as the main routine execution cycle may change because of an interrupt processing or others, the initial value n should have a margin. ? watches the operation of the interrupt processing routine by comparing the swdt conten ts with counts of interrupt processing after the initia l value n has been set. ? detects that the interrupt pr ocessing routine has failed and determines to branch to th e program initialization routine for recovery processing in the following case: if the swdt contents do not change after interrupt processing. ? decrements the swdt conten ts by 1 at each interrupt processing. ? determines that the main routine operates normally when the swdt contents are reset to the initial value n at almost fixed cycles (at the fixed interrupt processing count). ? detects that the main routine has failed and determines to branch to the program initia lization routine for recovery processing in the following case: if the swdt contents are not initialized to the initial value n but continued to decrement and if they reach 0 or less. fig 78. watchdog timer by software n.g. o.k. noise noise data bus direction register port latch i/o port pins n n >0 0 main routine (swdt) n cli main processing (swdt) =n? interrupt processing routine errors interrupt processing routine (swdt) (swdt) ? 1 interrupt processing (swdt) 0? rti return main routine errors
rev.2.00 mar 05, 2007 page 58 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. notes on use note on power source voltage when the power source voltage va lue of a microcomputer is less than the value which is indicat ed as the recommended operating conditions, the microc omputer does not operate normally and may perform unstable operation. in a system where the power source voltage drops slowly when the power source voltage drops or the power supply is turned off, reset a microcomputer when the s upply voltage is less than the recommended operating conditions and design a system not to cause errors to the system by this unstable operation. product shipped in blank as for the product shipped in blank, renesas does not perform the writing test to user rom area after the assembly process though the qzrom writing test is performed enough before the assembly process. therefore, a writing error of approx.0.1 % may occur. moreover, please note the contact of cables and foreign bodies on a socket, etc. because a wri ting environment may cause some writing errors. overvoltage take care not to apply the volta ge above the vcc pin voltage to other pins. make sure that the voltage of the cnv ss pin (v pp power input pin for qzrom) does not change as shown in the bold-lined periods (figure 79) when powering on and off. if the voltage changes as shown, the qzrom contents may be rewritten. fig 79. timing diagram (bold-lin ed periods are applicable) notes on qzrom notes on qzrom writing orders when ordering the qzrom product shipped after writing, submit the mask file (extension: .mask) which is made by the mask file converter mm. be sure to set the rom option (?mask option? written in the mask file converter) setup when making the mask file by using the mask file converter mm. notes on rom code protect (qzrom product shipped after writing) as for the qzrom product shippe d after writing, the rom code protect is specified according to the rom option setup data in the mask file which is submitted at ordering. renesas technology corp. write the value of the rom option setup data in the rom code protect address (address ffdb 16 ) when writing to the qzrom. as a result, in the contents of the rom code protect address the or dered value may differ from the actual written value. the rom option setup data in the mask file is ?00 16 ? for protect enabled or ?ff 16 ? for protect disabled. therefore, the contents of the rom code protect address (oth er than the user rom area) of the qzrom product shipped after writing is ?00 16 ? or ?ff 16 ?. note that the mask file which has nothing at the rom option data or has the data other than ?00 16 ? and ?ff 16 ? can not be accepted. data required for qzrom writing orders the following are necessary when ordering a qzrom product shipped after writing: 1. qzrom writing confirmation form* 2. mark specification form* 3. rom data .......... mask file * for the qzrom writing confirmation form and the mark specifi-cation form, refer to th e ?renesas technology corp.? homepage (http://www.ren esas.com/homepage.jsp). note that we cannot deal with special font marking (customer's trademark etc.) in qzrom microcomputer. v cc pin voltage cnv ss pin voltage 1.8v 1.8v (1) the input voltage to other mcu pins rises before the v cc pin voltage rises. (2) the input voltage to other mcu pins falls before the v cc pin voltage falls. note: if v cc falls below the minimum value 1.8 v (shaded areas), the internal circuit becomes unstable. take additional care to prevent overvoltage. ~ ~ (1) (2) ~ ~
rev.2.00 mar 05, 2007 page 59 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. electrical characteristics of 7549 group absolute maximum ratings absolute maximum ratings v cc v i v i v i v o p d t opr t stg power source voltage input voltage p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 ______ input voltage reset input voltage cnv ss output voltage p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 power dissipation operating temperature storage temperature ? 0.3 to 6.5 ? 0.3 to v cc + 0.3 ? 0.3 to v cc + 0.3 ? 0.3 to v cc + 0.3 ? 0.3 to v cc + 0.3 300 ? 20 to 85 ? 40 to 125 v v v v v mw c c t a = 25 c symbol parameter conditions ratings unit all voltages are based on v ss . when an input voltage is measured, output transistors are cut off.
rev.2.00 mar 05, 2007 page 60 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. recommended operating conditions recommended operating conditions (1) (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) notes: 1. the total output current is the sum of all the currents flow ing through all the applicable ports. the total average current i s an average value measured over 100 ms. the total peak current is the peak value of all the currents. 2. the peak output current is the peak current flowing in each port. 3. the average output current i ol (avg), i oh (avg) in an average value measured over 100 ms. 4. p2 0 and p2 1 indicates these pins are used as i/o ports. 5. x in and x cin indicates these pins are used as clock pins. min. 0.8v cc 0.8v cc 0 0 0 v v v v v v ma ma ma ma ma ma typ. 0 power source voltage ?h? input voltage (note 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 ?h? input voltage (note 5) reset, x in , xc in ______ ______ ?l? input voltage (note 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 ?l? input voltage reset, cnv ss ?l? input voltage (note 5) x in , xc in ?h? total peak output current (notes 1, 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 ?l? total peak output current (note 1) p0 0 ? p0 7 ?l? total peak output current (notes 1, 4) p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 ?h? total average output current (notes 1, 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 ?l? total average output current (note 1) p0 0 ? p0 7 ?l? total average output current (notes 1, 4) p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 v cc v ss v ih v ih v il v il v il i oh(peak) i ol(peak) i ol(peak) i oh(avg) i ol(avg) i ol(avg) ?h? peak output current (notes 2, 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 i oh(peak) ?l? peak output current (notes 2, 4) p0 0 ? p0 7 (drive capacity: weakness), p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 i ol(peak) ?l? peak output current (note 2) p0 0 ? p0 7 (drive capacity: strength) i ol(peak) ?h? average output current (notes 3, 4) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 i oh(avg) ?l? average output current (notes 3, 4) p0 0 ? p0 7 (drive capacity: weakness), p1 0 ? p1 7 , p2 0 , p2 1 , p3 0 , p3 1 i ol(avg) symbol parameter limits unit max. v cc v cc 0.2v cc 0.2v cc 0.16v cc ? 60 60 60 ? 30 30 30 ma ? 10 ma 10 ma 30 ma ? 5 ma 5 ?l? average output current (notes 3) p0 0 ? p0 7 (drive capacity: strength) i ol(avg) ma 15 4.5 5.5 v x in oscillation, x cin oscillation, external clock input 5.0 x cin oscillation 2.4 5.5 v 5.0 1.8 5.5 v 5.0 2.2 5.5 v 5.0 double-, high-, middle-, low-speed mode 4.0 5.5 v 5.0 high-speed on-chip oscillator low-speed on-chip oscillator double-, high-, middle-, low-speed mode 1.8 5.5 v 5.0 4.0 5.5 v 5.0 2.4 5.5 v 5.0 1.8 5.5 v 5.0 double-speed mode high-, middle-, low-speed mode f(x in ) 8mhz f(x in ) 2mhz f(x in ) 1mhz f(x in ) 8mhz f(x in ) 4mhz f(x in ) 1mhz double-, high-, middle-, low-speed mode f(x cin ) 50khz power source voltage
rev.2.00 mar 05, 2007 page 61 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. recommended operating conditions (2) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. when the oscillation frequency has a duty cycle of 50 %. fig 80. power source voltage and oscillation frequency min. typ. f(x in ) symbol parameter limits unit max. 8 8 50 mhz x cin oscillation (vcc ? 2.4) 2 0.7 mhz +2 khz 32.768 mhz x in oscillation external clock input mhz mhz mhz double-speed mode high-, middle-, low-speed mode vcc = 4.5 ? 5.5 v vcc = 2.4 ? 4.5 v vcc = 2.2 ? 2.4 v vcc = 4.0 ? 5.5 v vcc = 2.4 ? 4.0 v vcc = 1.8 ? 2.4 v double-, high-, middle-, low-speed mode vcc = 1.8 ? 5.5 v x in oscillation frequency (note 1) x cin oscillation frequency (note 1) (vcc ? 2.2) 0.2 +1 (vcc ? 2.4) 0.4 +4 (vcc ? 1.8) 0.2 +1 oscillation frequency: x in (mhz) power source voltage: vcc(v) 8.0 4.0 2.0 1.0 0.0 0.0 1.5 2.5 3.5 4.5 5.5 2.0 3.0 4.0 5.0 low-speed on-chip oscillator (5v/typ:250khz)/ / double-, high-, middle-, low-speed mode high-speed on-chip oscillator (5v/typ:4mhz) double-, high-, middle-, low-speed mode x cin oscillation/ / double-, high-, middle-, low-speed mode x in oscillation double-speed mode x in oscillation high-, middle-, low-speed mode when x in is used, the mcu can be operated within the range shown in diagonal lines. confirm that the oscillation is stable within the operating supply voltage range before use. contact the oscillator manufacturer for oscillation constants.
rev.2.00 mar 05, 2007 page 62 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. electrical characteristics electrical characteristics (1) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) notes: 1. p2 0 and p2 1 indicates these pins are used as i/o ports. 2. x in and x cin indicates these pins are used as clock pins. 3. p0 5 is measured when the p0 5 /t x d p-channel output disable bit of the ua rt1 control register (bit 4 of address 001b 16 ) is ?0?. 4. it is available only when operating key-on wake up. symbol parameter limits min. typ. max. unit ?h? output voltage (notes 1, 3) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 vcc ? 1.5 v v oh ?l? output voltage (note 1) p0 0 ? p0 7 (drive capacity: weakness) p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 v ol test conditions i oh = ? 5 ma, vcc = 4.0 ? 5.5 v i oh = ? 1.0 ma, vcc = 1.8 ? 5.5 v vcc ? 1.0 v i ol = 5 ma, vcc = 4.0 ? 5.5 v 1.5 v i ol = 1.5 ma, vcc = 4.0 ? 5.5 v 0.3 v i ol = 1.0 ma, vcc = 1.8 ? 5.5 v 1.0 v ?l? output voltage p0 0 ? p0 7 (drive capacity: strength) v ol i ol = 15 ma, vcc = 4.0 ? 5.5 v 2.0 v i ol = 1.5 ma, vcc = 4.0 ? 5.5 v 0.3 v i ol = 1.0 ma, vcc = 1.8 ? 5.5 v 1.0 v hysteresis int 0 , int 1 , cap 0 , p1 0 ? p1 7 ( note 4) r x d, s clk , reset v t+ ? v t- 0.5 v ?h? input current ( note 1) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 i ih v i = vcc (pin floating. pull up transistors is disable) 5.0 oscillation stop detection circuit detection frequency 62.5 250 khz 150 d osc vcc = 5.0 v, ta = 25 c low-speed on-chip oscillator oscillation frequency 125 500 khz 250 r lsosc vcc = 5.0 v, ta = 25 c ?h? input current reset i ih v i = vcc 5 a a ?h? input current ( note 2) x in i ih v i = vcc 4.0 a ?l? input current ( note 1) p0 0 ? p0 7 , p1 0 ? p1 7 , p2 1 , p3 0 , p3 1 i il v i = vss (pin floating. pull up transistors is disable ) ? 5.0 a ?l? input current reset i il v i = vss ? 0.7 ma ?l? input current ( note 2) x in i il v i = vss ? 4.0 a ?l? input current p0 0 ? p0 7 , p1 0 ? p1 7 i il v i = vss (pull up transistors is enable ) ? 0.5 ? 0.2 ma ram hold voltage 1.6 5.5 v v ram when clock stopped pull-up resistor value reset r ph v i = vss 25 k ? high-speed on-chip oscillator oscillation frequency mhz r hsos c vcc = 4.0 ? 5.5 v, ta = ? 20 ? 85 c 4 vcc = 4.0 ? 5.5 v, ta = 0 ? 50 c tbd tbd 4 tbd tbd ?h? input current (note 2) x cin i ih v i = vcc 0.5 a ?l? input current ( note 2) x cin i il v i = vss ? 0.3 a
rev.2.00 mar 05, 2007 page 63 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. electrical characteristics (2) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) symbol parameter test conditions limits min. typ. max. unit icc power source current f(x in )=8 mhz (ceramic resonator) vcc = 5.0 v high-speed on-chip oscillator: stop low-speed on-chip oscillator: stop output transistors ? off ? low voltage detection circuit: enable low-speed on-chip oscillator: oscillation vcc = 5.0 v high-speed on-chip oscillator: stop x in : stop output transistors ? off ? low voltage detection circuit: enable increment when a/d conversion is executed f(x in ) = 8 mhz, , vcc = 5.0 v stop mode output transistors ? off ? low-speed on-chip oscillator: stop low voltage detection circuit: stop ta = 25 c ta = 85 c double-speed mode 5.2 2.5 a a ma low-speed mode 1.7 0.6 ma high-speed on-chip oscillator: oscillation vcc = 5.0 v low-speed on-chip oscillator: stop x in : stop output transistors ? off ? low voltage detection circuit: enable 1.0 0.35 ma f(x in ) = 2 mhz (ceramic resonator) vcc = 2.0 v high-speed on-chip oscillator: stop low-speed on-chip oscillator: stop output transistors ? off ? low voltage detection circuit: enable low-speed on-chip oscillator: oscillation vcc = 2.0 v high-speed on-chip oscillator: stop x in : stop output transistors ? off ? low voltage detection circuit: enable low-speed mode 70 25 a 60 23 a 0.5 ma 1.0 0.1 10 wait mode, functions except timer 1 disabled wait mode, functions except timer 1 disabled f(x cin )=32.768 khz vcc = 5.0 v high-speed on-chip oscillator: stop low-speed on-chip oscillator: stop output transistors ? off ? low voltage detection circuit: enable f(x cin ) = 32.768 khz vcc = 2.0 v high-speed on-chip oscillator: stop low-speed on-chip oscillator: stop output transistors ? off ? low voltage detection circuit: enable low-speed mode 450 190 a 430 150 a wait mode, functions except timer 1 disabled low-speed mode 65 24 a 55 23 a wait mode, functions except timer 1 disabled low voltage detection circuit self consumption current ta = 25 c vcc = 2.0 v ta = 25 c vcc = 5.0 v 70 20 a a double-speed mode 600 230 a low-speed mode 400 120 a 350 105 a wait mode, functions except timer 1 disabled double-speed mode 10 6.0 ma low-speed mode 6.0 2.6 ma 5.0 1.9 ma wait mode, functions except timer 1 disabled double-speed mode 200 100 a low-speed mode 180 85 a 170 80 a wait mode, functions except timer 1 disabled
rev.2.00 mar 05, 2007 page 64 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. a/d converter characteristics a/d converter characteristics (v cc = 2.7 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) a/d converter recommended operating conditions (v cc = 2.7 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. when x cin or the low-speed on-chip oscillator is selected as source, the a/d converter cannot be used. symbol test conditions limits min. typ. max. unit 10 bits k ? 55 parameter resolution absolute accuracy (excluding quantization error) conversion time ladder resistor a/d port input current 5.0 a t conv r ladder i i(ad) tc( source) 122 tc( source) 61 a/d conversion clock = f( source) a/d conversion clock = f( source)/2 lsb ta = ? 20 ? 85 c, 2.7 vcc 5.5v tbd symbol parameter test conditions limits unit a/d conversion clock frequency (note) (ad) mhz 4.0 vcc 5.5 v tbd 8 mhz tbd 4 2.7 vcc < 4.0 v power source voltage ta = ? 20 ? 85 c min. typ. max. 2.7 5.5 v v cc
rev.2.00 mar 05, 2007 page 65 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. power-on reset circuit characteristics power-on reset circuit characteristics (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. v por is the start voltage level of vcc for the built-in power-on reset circuit to operate normally. keep v por to be lower than the vcc voltage before rising of the vcc power source to use the built-in power-on reset circuit. set the built-in low voltage detection circuit to be valid when the built-in power-on reset is used. low voltage detection circuit characteristics low voltage detection circuit characteristics (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. v lvd is the start voltage level of vcc for the built-in low voltage detection circuit to operate normally. if the vcc power source becomes lower than v lvd , first set the vcc voltage to be lower than v por . next, according to the electrical characteristics of the power-on reset circuit, perform the rising of vcc. fig 81. electrical characteristics of power-on r eset circuit and voltage drop detection circuit v por tw(v por ) tw(v por -v det ) valid start voltage of power-on reset circuit (note) v por hold time rising time of valid power source of power-on reset circuit symbol parameter limits unit min. typ. v s ms max. 0 10 20 tw(v por ) > 10s test conditions v lvd tw(v lvd ) tw(v lvd -v det ) v det- v(v det+- v det- ) t det valid start voltage of low voltage detection circuit (note) v lvd hold time rising time of valid power source of low voltage detection circuit detection voltage of low voltage detection circuit detection voltage hysteresis (when hysteresis is valid) detection time of low 5voltage detection circuit symbol parameter limits unit min. 1.0 1.85 1.80 typ. 1.95 1.95 0.10 20 v s s v v v s max. 10 10 2.05 2.10 tw(v lvd ) > 10s t a = 0 ? 50 c t a = ? 20 ? 85 c t a = ? 20 ? 85 c test conditions vcc power source waveform v por 0v tw(v por )t t(v pon -v det ) t det tw(v lvd )t t(v lvd -v det ) note v det+ v det- internal reset signal power-on reset circuit characteristics low voltage detection circuit characteristics v por note: if schmitt of the voltage drop detection circuit is set to be invalid, system is released from reset at the timing of ris ing to power source voltage v det- .
rev.2.00 mar 05, 2007 page 66 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. timing requirements timing requirements (1) (v cc = 4.0 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) notes: 1. as for cap 0 , it is the value when noise filter is not used. 2. in this time, bit 6 of the serial i/o control register (address 001a 16 ) is set to ?1? (clock synchr onous serial i/o is selected). when bit 6 of the serial i/o control register is ?0? (clock asynchronous serial i/o is select ed), the rating values are divided by 4. timing requirements (2) (v cc = 2.4 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) notes: 1. as for cap 0 , it is the value when noise filter is not used. 2. in this time, bit 6 of the serial i/o control register (address 001a 16 ) is set to ?1? (clock synchr onous serial i/o is selected). when bit 6 of the serial i/o control register is ?0? (clock asynchronous serial i/o is select ed), the rating values are divided by 4. reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width int 0 , int 1 , cap 0 input ?h? pulse width (note 1) int 0 , int 1 , cap 0 input ?l? pulse width (note 1) serial i/o clock input cycle time (note 2) serial i/o clock input ?h? pulse width (note 2) serial i/o clock input ?l? pulse width (note 2) serial i/o input set up time serial i/o input hold time symbol parameter limits unit min. 2 125 50 50 80 80 800 370 370 220 100 typ. s ns ns ns ns ns ns ns ns ns ns max. ______ t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t wh (int 0 ) t wl (int 0 ) t c (s clk ) t wh (s clk ) t wl (s clk ) t su (r x d-s clk ) t h (s clk -r x d) reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width int 0 , int 1 , cap 0 input ?h? pulse width (note 1) int 0 , int 1 , cap 0 input ?l? pulse width (note 1) serial i/o clock input cycle time (note 2) serial i/o clock input ?h? pulse width (note 2) serial i/o clock input ?l? pulse width (note 2) serial i/o input set up time serial i/o input hold time symbol parameter limits unit min. 2 250 100 100 230 230 2000 950 950 400 200 typ. s ns ns ns ns ns ns ns ns ns ns max. ______ t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t wh (int 0 ) t wl (int 0 ) t c (s clk ) t wh (s clk ) t wl (s clk ) t su (r x d-s clk ) t h (s clk -r x d)
rev.2.00 mar 05, 2007 page 67 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. timing requirements (3) (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) notes: 1. as for cap 0 , it is the value when noise filter is not used. 2. in this time, bit 6 of the serial i/o control register (address 001a 16 ) is set to ?1? (clock synchr onous serial i/o is selected). when bit 6 of the serial i/o control register is ?0? (clock asynchronous serial i/o is select ed), the rating values are divided by 4. reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width int 0 , int 1 , cap 0 input ?h? pulse width (note 1) int 0 , int 1 , cap 0 input ?l? pulse width (note 1) serial i/o clock input cycle time (note 2) serial i/o clock input ?h? pulse width (note 2) serial i/o clock input ?l? pulse width (note 2) serial i/o input set up time serial i/o input hold time symbol parameter limits unit min. 2 500 200 200 460 460 4000 1900 1900 800 400 typ. s ns ns ns ns ns ns ns ns ns ns max. ______ t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t wh (int 0 ) t wl (int 0 ) t c (s clk ) t wh (s clk ) t wl (s clk ) t su (r x d-s clk ) t h (s clk -r x d)
rev.2.00 mar 05, 2007 page 68 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. switching characteristics switching characteristics (1) (v cc = 4.0 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. pin x out is excluded. switching characteristics (2) (v cc = 2.4 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. pin x out is excluded. switching characteristics (3) (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ? 20 to 85 c, unless otherwise noted) note: 1. pin x out is excluded. fig 82. switching characteristics measurement circuit diagram t wh (s clk ) t wl (s clk ) t d (s clk -t x d) t v (s clk -t x d) t r (s clk ) t f (s clk ) t r (cmos) t f (cmos) serial i/o clock output ?h? pulse width serial i/o clock output ?l? pulse width serial i/o output delay time serial i/o output valid time serial i/o clock output rising time serial i/o clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) symbol parameter limits unit min. t c (s clk )/2 ? 30 t c (s clk )/2 ? 30 ? 30 typ. 10 10 ns ns ns ns ns ns ns ns max. 140 30 30 30 30 t wh (s clk ) t wl (s clk ) t d (s clk -t x d) t v (s clk -t x d) t r (s clk ) t f (s clk ) t r (cmos) t f (cmos) serial i/o clock output ?h? pulse width serial i/o clock output ?l? pulse width serial i/o output delay time serial i/o output valid time serial i/o clock output rising time serial i/o clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) symbol parameter limits unit min. t c (s clk )/2 ? 50 t c (s clk )/2 ? 50 ? 30 typ. 20 20 ns ns ns ns ns ns ns ns max. 350 50 50 50 50 t wh (s clk ) t wl (s clk ) t d (s clk -t x d) t v (s clk -t x d) t r (s clk ) t f (s clk ) t r (cmos) t f (cmos) serial i/o clock output ?h? pulse width serial i/o clock output ?l? pulse width serial i/o output delay time serial i/o output valid time serial i/o clock output rising time serial i/o clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) symbol parameter limits unit min. t c (s clk )/2 ? 70 t c (s clk )/2 ? 70 ? 30 typ. 25 25 ns ns ns ns ns ns ns ns max. 450 70 70 70 70 measured output pin 100pf cmos output
rev.2.00 mar 05, 2007 page 69 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. fig 83. timing chart 0 . 2 v c c t d (s clk -txd) t f 0.2v cc 0.8v cc 0 . 8 v c c t r t su (rxd-s clk )t h (s clk -rxd) t v (s clk -txd ) t c (s clk ) t wl (s clk ) t wh (s clk ) r x d (at receive) s clk 0 . 2 v c c t wl (x in ) 0 . 8 v c c t wh (x in ) t c (x in ) x i n 0.2v cc 0.8v cc t w (reset) r e s e t t x d (at transmit) 0 . 2 v c c t w l ( i n t 0 ) 0 . 8 v c c t w h ( i n t 0 ) int 0 , int 1 cap 0
rev.2.00 mar 05, 2007 page 70 of 70 rej03b0202-0200 7549 group preliminary notice: this is not a final specification. some parametric limits are subject to change. package outline f 1 12 13 24 * 2 * 1 * 3 index mark y e h e e b p d a c detail f a 1 a 2 l include trim offset. dimension " * 3" does not note) do not include mold flash. dimensions " * 1" and " * 2" 1. 2. a 1 0 0.1 0.2 previous code jeita package code renesas code prsp0024ga-a 24p2q-a mass[typ.] 0.2g p-ssop24-5.3x10.1-0.80 0.25 0.2 0.18 0.45 0.35 0.3 max nom min dimension in millimeters symbol reference 10.2 10.1 10.0 d 5.4 5.3 5.2 e 1.8 a 2 8.1 7.8 7.5 2.1 a 0.8 0.6 0.4 l 8 0 c 0.8 e 0.10 y h e b p 0.65 0.95
a - 1 revision history 7549 group datasheet rev. date description page summary 1.00 dec 15, 2006 - first edition issued 2.00 feb 19, 2007 1 features: ?? led output port? ?? led direct drive port? ?? built-in high-speed on-chip oscillator? ?high-speed on-chip oscillator? ?? built-in low-speed on-chip oscillator? ?low-speed on-chip oscillator? ?power dissipation: ?tbd? ?30 mw? 4 table 1: i/o port p0 0 -p0 7 ; ?led direct drive ports? is added a/d converter; ?8 channel? ? 8 channel? 6table 2: p0 3 ?capture function pin? ?capture input pin? p1 0 -p1 2 ?compare function pin? ?compare output pin? p1 3 ?timer 2 function pin? ?timer 2 output pin? p2 0, p2 1 ?external oscillator pin? ?clock pins? 10 [cpu mode register]: description is revised and moved from the page 12. 11 function set rom area: description is revised and moved from the page 47. : (2) is added, (3) is revised 12 fig 8 note is deleted 14 fig 10, fig 11, fig 12 is moved from the page 47. fig 12 is revised 15 [pull-up control registers]: description revised fig 13, fig 14, fig 15 is revised 16 table 6 is revised 17, 18 fig 16, fig 17; title is revised 19 contents of table 7 is added 21 table 8: key-on wakeup ?p0? ?p1? 24 timers, ? notes on timers 1 and 2: description is revised 26 timer a (ta), ? notes on timer a: description is revised 27 output compare: contents of description added fig 29 ?oscillator/512 ? ?oscillator/16 ? 31 input capture: contents of description added 32 fig 39 ?oscillator/512? ?oscillator/16? 37, 38 register name: ?a/d? ?ad? 38 ? notes on a/d converter: (2) is added 39 watchdog timer is revised fig 50, fig 53 is revised 40 ? notes on watchdog timer is revised 42 fig 56 is revised 43 clock circuit is revised 44 oscillation control is added table 9 is added fig 61 is revised 47 fig 62 is revised 48 fig 63 is revised 49 ?oscillation stop? ?oscillation stop detection? fig 64 is revised fig 65 is revised, note 4 is added ? notes on function set rom data 2 is deleted 50 table 10: p1 0 ?esda input? ?esda i/o?, ?output? ?i/o? revision history
a - 2 revision history 7549 group datasheet 2.00 feb 19, 2007 53 (7) cpu mode register is revised 58 overvoltage: description revised, fig 79 is added 59 electrical characteristics is added rev. date description page summary
notes: 1. this document is provided for reference purposes only so that renesas customers may select the appropriate renesas product s for their use. renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of renesas or any third party with respect to the information in this document. 2. renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of t he use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. you should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. when exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. all information included in this document such as product data, diagrams, charts, programs, algorithms, and application ci rcuit examples, is current as of the date this document is issued. such information, however, is subject to change without any prior notice. before purchasing or using any renesas products listed in this document, please confirm the latest product information with a renesas sales office. also, please pay regular and careful attentio n to additional and different information to be disclosed by renesas such as that disclosed through our website. (http://www.renesas.com ) 5. renesas has used reasonable care in compiling the information included in this document, but renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. when using or otherwise relying on the information in this document, you should evaluate the information in light of the t otal system before deciding about the applicability of such information to the intended application. renesas makes no representations, warranties or guaranties regarding th e suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this do cument or renesas products. 7. with the exception of products specified by renesas as suitable for automobile applications, renesas products are not desi gned, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of h uman injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion co ntrol, aerospace and aeronautics, nuclear power, or undersea communication transmission. if you are considering the use of our products for such purposes, please contact a r enesas sales office beforehand. renesas shall have no liability for damages arising out of the uses set forth above. 8. notwithstanding the preceding paragraph, you should not use renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to us e renesas products in any of the foregoing applications shall indemnify and hold harmless renesas technology corp., its affiliated companies and their officers, dir ectors, and employees against any and all damages arising out of such applications. 9. you should use the products described herein within the range specified by renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. renesas sha ll have no liability for malfunctions or damages arising out of the use of renesas products beyond such specified ranges. 10. although renesas endeavors to improve the quality and reliability of its products, ic products have specific characteristic s such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. please be sure to implement safety measures to guard against the poss ibility of physical injury, and injury or damage caused by fire in the event of the failure of a renesas product, such as safety design for hardware and software includin g but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. among others, sinc e the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. in case renesas products listed in this document are detached from the products to which the renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. you should implement safety measures so that renesas products may not be easily detached from your products. renesas shall have no liability for damages arising out of such detachment. 12. this document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from r enesas. 13. please contact a renesas sales office if you have any questions regarding the information contained in this document, renes as semiconductor products, or if you have any other inquiries. sales strategic planning div. nippon bldg., 2-6-2, ohte-machi, chiyoda-ku, tokyo 100-0004, japan http://www.renesas.com refer to " http://www.renesas.com/en/network " for the latest and detailed information. renesas technology america, inc. 450 holger way, san jose, ca 95134-1368, u.s.a tel: <1> (408) 382-7500, fax: <1> (408) 382-7501 renesas technology europe limited dukes meadow, millboard road, bourne end, buckinghamshire, sl8 5fh, u.k. tel: <44> (1628) 585-100, fax: <44> (1628) 585-900 renesas technology (shanghai) co., ltd. unit 204, 205, aziacenter, no.1233 lujiazui ring rd, pudong district, shanghai, china 200120 tel: <86> (21) 5877-1818, fax: <86> (21) 6887-7898 renesas technology hong kong ltd. 7th floor, north tower, world finance centre, harbour city, 1 canton road, tsimshatsui, kowloon, hong kong tel: <852> 2265-6688, fax: <852> 2730-6071 renesas technology taiwan co., ltd. 10th floor, no.99, fushing north road, taipei, taiwan tel: <886> (2) 2715-2888, fax: <886> (2) 2713-2999 renesas technology singapore pte. ltd. 1 harbour front avenue, #06-10, keppel bay tower, singapore 098632 tel: <65> 6213-0200, fax: <65> 6278-8001 renesas technology korea co., ltd. kukje center bldg. 18th fl., 191, 2-ka, hangang-ro, yongsan-ku, seoul 140-702, korea tel: <82> (2) 796-3115, fax: <82> (2) 796-2145 renesas technology malaysia sdn. bhd unit 906, block b, menara amcorp, amcorp trade centre, no.18, jalan persiaran barat, 46050 petaling jaya, selangor darul ehsan, malaysia tel: <603> 7955-9390, fax: <603> 7955-9510 renesas sales offices ? 200 7. re nesas technology corp ., all rights reser v ed. printed in ja pan. colophon .7.0


▲Up To Search▲   

 
Price & Availability of 7549

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X